Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLC-iOS
Commits
73ceb365
Commit
73ceb365
authored
Mar 28, 2013
by
Felix Paul Kühne
Browse files
AspenProject: implement a basic playlist view
parent
eb3cfe3b
Changes
3
Hide whitespace changes
Inline
Side-by-side
AspenProject/VLCAppDelegate.m
View file @
73ceb365
...
...
@@ -95,7 +95,7 @@
}
}
[[
MLMediaLibrary
sharedMediaLibrary
]
addFilePaths
:
filePaths
];
[
_playlistViewController
update
MediaDatabase
];
[
_playlistViewController
update
ViewContents
];
}
@end
AspenProject/VLCPlaylistViewController.h
View file @
73ceb365
...
...
@@ -14,6 +14,6 @@
@property
(
strong
,
nonatomic
)
VLCDetailViewController
*
detailViewController
;
-
(
void
)
update
MediaDatabase
;
-
(
void
)
update
ViewContents
;
@end
AspenProject/VLCPlaylistViewController.m
View file @
73ceb365
...
...
@@ -49,7 +49,8 @@
self
.
navigationItem
.
rightBarButtonItem
=
self
.
editButtonItem
;
[
self
updateMediaDatabase
];
[
self
updateViewContents
];
[[
MLMediaLibrary
sharedMediaLibrary
]
libraryDidAppear
];
}
-
(
void
)
didReceiveMemoryWarning
...
...
@@ -60,7 +61,7 @@
#pragma mark - Table View
-
(
void
)
update
MediaDatabase
-
(
void
)
update
ViewContents
{
[[
MLMediaLibrary
sharedMediaLibrary
]
updateMediaDatabase
];
...
...
@@ -68,6 +69,8 @@
[
_foundMedia
release
];
_foundMedia
=
[[
NSMutableArray
arrayWithArray
:[
MLFile
allFiles
]]
retain
];
[
self
.
tableView
reloadData
];
}
-
(
NSInteger
)
numberOfSectionsInTableView
:(
UITableView
*
)
tableView
...
...
@@ -77,6 +80,7 @@
-
(
NSInteger
)
tableView
:(
UITableView
*
)
tableView
numberOfRowsInSection
:(
NSInteger
)
section
{
NSLog
(
@"found %u media"
,
_foundMedia
.
count
);
return
_foundMedia
.
count
;
}
...
...
@@ -96,6 +100,7 @@
MLFile
*
object
=
_foundMedia
[
indexPath
.
row
];
cell
.
textLabel
.
text
=
object
.
title
;
NSLog
(
@"returning cell with title %@"
,
object
.
title
);
return
cell
;
}
...
...
@@ -145,4 +150,10 @@
}
}
#pragma mark - UI implementation
-
(
void
)
showAboutView
:(
id
)
sender
{
NSLog
(
@"asked to show the about view"
);
}
@end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment