1

私はこれに非常に慣れておらず、最初のアプリを作成しています。実行しようとすると、xcode には成功したと表示されますが、シミュレーターで黒い画面が表示され、このメッセージが表示されます。ここに私の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

何が間違っていたのかわかりません。誰か助けてくれませんか?私はそれを大いに感謝します。

4

0 に答える 0