私は TTLauncherView を使用しており、そのために TTCatalog チュートリアル アプリのようにビュー コントローラーを TTViewController として宣言しています。そのビュー内で TTLauncherView 変数を宣言し、項目を追加します。
私のアプリのメイン ビューには、次のコードで前のビューを呼び出すボタンがあります。
-(void) switchToButtonOrderingView
{
ButtonOrderingViewController *ButtonOrderingView=
[[ButtonOrderingViewController alloc] initWithNibName:@"ButtonOrderingViewController" bundle:nil];
self.ButtonOrderingViewController = ButtonOrderingView;
[self.view insertSubview:ButtonOrderingView.view atIndex:10];
}
ボタンを押すと、TTViewController.m に属するこのメソッドでアプリが停止します。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
UIViewController* popup = [self popupViewController]; //brakes up here
if (popup) {
return [popup shouldAutorotateToInterfaceOrientation:interfaceOrientation];
} else {
return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}
}
エラーは次のようになります。
[ButtonOrderingViewController popupViewController]: 認識されないセレクターがインスタンスに送信されました
Three20 クラス階層と TTViewController が UIViewController サブクラスであることを確認しました。
popupViewController は TTPopViewController (およびそのサブクラス) メソッドです! 私は使用していませんし、TTCatalog チュートリアル アプリも使用していません。道に迷いました。どんな助けでも大歓迎です。
ありがとう。