开发者

MPMoviePlayerViewController crashes on OS 3.0

During the testing of my app i discovered that it crashed on an iphone with OS 3.0.1 and 3.1.1(iPod Touch).

I have the following code for playing the video which is placed on a remote server. It works flawlessly on the iOS 4.0 and iPad with OS 3.2

Xcode is setup to use SDK 4.0 but target OS is 3.0.

NSURL *url = [NSURL  URLWithString:selectedLink];开发者_开发百科  
MPMoviePlayerViewController *moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; 
[self presentMoviePlayerViewControllerAnimated:moviePlayer];
[moviePlayer release];

When run on 3.0.1 and 3.1.1 I receive the following error:

-[UIViewController presentMoviePlayerViewControllerAnimated:]: unrecognized selector sent to instance 0x231550
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:  -[UIViewController presentMoviePlayerViewControllerAnimated:]: unrecognized selector sent to instance 0x231550'

Hope you guys can help me.


MPMoviePlayerViewController has been added recently and is available in iPhone OS 3.2 and later.

You should use MPMoviePlayerController.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜