0
我創建TTThumbsViewController大拇指(從JSON數據),當用戶點擊拇指,我的應用程序必須在新的子視圖打開的視頻是這樣的:如何在用戶點擊TTThumbsViewController中的拇指時顯示自定義視圖?
- (void)thumbsViewController: (TTThumbsViewController*)controller
didSelectPhoto: (id<TTPhoto>)photo
{
NSMutableArray *photoset = [[NSMutableArray alloc] initWithArray:[self.photoSource photos]];
Photo *selected = [photoset objectAtIndex:[photo index]];
NSLog(@"%@", [selected urlLarge]);
NSURL *url = [NSURL URLWithString:[selected urlLarge]];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
if ([moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]) {
moviePlayer.controlStyle = MPMovieControlStyleDefault;
moviePlayer.shouldAutoplay = YES;
[self.view addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
} else {
[moviePlayer play];
}
}
的NSLog顯示,拇指點擊,但它打開默認TTPhotoViewController :(我想禁用,並只顯示該子視圖。