i'm stuck at AVAudioPlayer in my project.the scenario is, in CollectionViewController's "didSelectItemAtIndexPath" method, i alloc and init AVAudioPlayer like bellow,
dict=[plist objectAtIndex:indexPath.item];
NSURL* urlPath=[NSURL new];
urlPath=[NSURL URLWithString:[dict objectForKey:@"FilePath"]];
NSError *error = nil;
self.player=[[AVAudioPlayer alloc]initWithContentsOfURL:urlPath error:&error];
NSLog(@"Error[%@]",[error localizedDescription]);
[self.player setDelegate:self];
[self.player prepareToPlay];
but after this,it still remains nill.. first, i tried without making property of player.but no luck.... so i try with this