次のチュートリアルhttp://www.xcode-tutorials.com/multiview-application/をフォローしようとしています。
しかし、私はに遭遇し続けました
「NIBをバンドルでロードできませんでした:'NSBunde....」
ボタンクリックイベントで失敗しました。以下はボタンクリックイベントのコードです
-(IBAction)swapViews:(id)sender
{
windowsbasedmultiviewAppDelegate *delegate = (windowsbasedmultiviewAppDelegate *)[[UIApplication sharedApplication] delegate];
FirstViewController *newView = [[FirstViewController alloc] initWithNibName:@"FirstViewcController" bundle:nil];
[delegate switchView:self.view toView:newView.view]; -- It failed here
}
以下はswitchViewのコードです
-(void)switchView:(UIView *)view1 toView:(UIView *)view2{
[UIView beginAnimations:@"Animation" context:nil];
[UIView setAnimationDuration:.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.window cache:YES];
[view1 removeFromSuperview];
[_window addSubview:view2];
[UIView commitAnimations];
}
Xcode4とIOS4.3を使用しています。どうもありがとうございます