dimanche 1 février 2015

Xcode, create two the same MyMoviePlayerController in two ViewController


Vote count:

0




I have a ViewController:



ReadViewController.h
ReadViewController.m


And I have a MPMoviePlayerController inside ReadViewController:



ReadViewController.h
@interface ReadViewController : UIViewController
@property (nonatomic, strong) MyMoviePlayerController *myPlayView;
@end



ReadViewController.m

- (void)viewDidLoad
{
.....
.....
.....
[self.view addSubview:self.myPlayView.view];
}


I created two objects of ReadViewController which one is small size used for “preview” and another is Screen Size. I put the two ViewControllers in two place:



ReadViewController *bigSizeReadViewController = [[ReadViewController alloc] init];
//put bigSizeReadViewController inside an UITabBarController


.....



ReadViewController *smallSizeReadViewController = [[ReadViewController alloc] init];
smallSizeReadViewController.view.frame = CGRectMake(200, 300, 400, 600);
[...... addSubView:smallSizeReadViewController.view];


I put the two ViewControllers in two place. When I run this on IPAD Simulator, self.myPlayView inside small size's ReadViewController can be played normally. But self.myPlayView inside big size's ReadViewController can not be played normally and show black screen.


Could anyone help me with this issue? Sorry for my bad English.



asked 13 secs ago







Xcode, create two the same MyMoviePlayerController in two ViewController

Aucun commentaire:

Enregistrer un commentaire