解析plistファイル(Objective-C版)
766 ワード
http://potter528.bj.bdysite.com
self.playlistはプレイアレイです。
Music Info is Model
self.playlistはプレイアレイです。
Music Info is Model
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// ,
[self.playlist removeAllObjects];
NSArray *temparr = [NSArray arrayWithContentsOfURL:[NSURL URLWithString:kPlaylistURL]];
for (NSDictionary *dic in temparr) {
// Music
MusicInfo *music = [MusicInfo new];
[music setValuesForKeysWithDictionary:dic];
[self.playlist addObject:music];
}
dispatch_async(dispatch_get_main_queue(), ^{
//
handler();
});
});