Xcode "Espera-se que o windows do aplicativo tenha um controlador de visualização raiz no final do lançamento do aplicativo"
Eu sou muito novo nisso e estou fazendo meu primeiro aplicativo. Quando eu tento executá-lo, xcode diz que foi bem sucedido, mas o simulador só me dá uma tela preta e eu recebo esta mensagem. Aqui está o meu código main.m:
@implementation ViewController
@synthesize button;
@synthesize text;
- (IBAction)pushButton:(id)sender
{
CGRect webRect=CGRectMake(10, 10, 2048, 1536);
UIWebView *myWebview = [[UIWebView alloc] initWithFrame:webRect];
myWebview.scalesPageToFit = YES;
NSURL *url = [NSURL URLWithString:@"http://www.coronetjck/schedule"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[myWebview loadRequest:request];
[self.view addSubview:myWebview];
}
//web view after pushing button
-(void)loadView {
NSString *moviePath = [[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:@"the_people_vs._george_lucas_teaser_hd_teaser_2_640x360.mp4"];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]];
moviePlayer.movieControlMode = MPMovieControlModeDefault;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
[moviePlayer play];
}
//video
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)viewDidUnload
{
[self setButton:nil];
[self setText:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
@end
Não tenho certeza do que fiz de errado, alguém poderia me ajudar? Eu agradeceria muito.