I want to use the UIViewController MediaPlayer additions in an iPhone 4 static library.
The .h of my view controller subclass imports <MediaPlayer/MediaPlayer.h>
. However, when I use presentMoviePlayerViewControllerAnimated
in the .m I get a compiler warning:
'MyViewController' may not respond to '-presentMoviePlayerViewControllerAnimated:animated:'
What am I doing wrong? How do I avoid this warning? Does the static library have anything to do with this?
Current code:
NSURL* url = [NSURL URLWithString:urlAsString];
if ([MPMoviePlayerController instancesRespondToSelector:@selector(setFullscreen:animated:)]) {
// iPhone 3.2 or higher
MyMoviePlayerViewControllerSubclass* vc = [[MyMoviePlayerViewControllerSubclass alloc] initWithContentURL:url];
[self presentMoviePlayerViewControllerAnimated:vc animated:YES];
[vc release];
}