我在下面的代码中收到这些警告。任何想法如何解决这个问题?谢谢你的帮助。
- 缺少类型说明符,默认为 'int'
- 指向使用 'void *' 类型的表达式初始化 'int' 的整数转换的不兼容指针;
- 未使用的变量“mymoviePlayerController”
重要的线是"__block mymoviePlayerController = nil;
- (void) moviePlaybackCompleteLightBox:(NSNotification*) notification {
MPMoviePlayerController *mymoviePlayerController = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:mymoviePlayerController];
// movie fadein transition ====================
self.moviePlayerController.view.alpha = 1;
[UIView animateWithDuration:0.3f delay:0.0 options:UIViewAnimationCurveEaseOut
animations:^{
self.moviePlayerController.view.alpha = 0;
}
completion:^(BOOL finished) {
[mymoviePlayerController stop];
[mymoviePlayerController.view removeFromSuperview];
__block mymoviePlayerController = nil;
}];
}