私は、単純なコントローラとiPadビューを使って、プログラムで作成したストーリーボード(iOS 5のみ)を使用しています。ジェスチャー認識機能が必要です。 [DOiPadStoryboardViewController handleSliding:]: -ジェスチャーレコグナイザとストーリーボードを使ったEXC_BAD_ACCESS
***:割り当て解除インスタンスに0x238580
を送信されたメッセージは、それは私がやっているシンプルなものでなければなりません。しかしアプリケーションのロードと私はEXC_BAD_ACCESSを取得gustierが作るとき違う。コントローラーの割り当てが解除されるのはなぜですか?
私は次のコードを使用してストーリーボードを作成する:
if (isIOS5) {
// iOS 5 with storyboard
UIViewController *viewControler = nil;
if([self isiPad]){
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"iPadStoryboard" bundle: [NSBundle mainBundle]];
viewControler = [storyboard instantiateInitialViewController];
} else {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"iPhoneStoryboard" bundle: [NSBundle mainBundle]];
viewControler = [storyboard instantiateInitialViewController];
}
[self.window addSubview:viewControler.view];
}
ジェスチャ認識装置は、メインビューに接続され、IBActionは、ビューコントローラです。ストーリーボードは、以下のようになります(ただし、これは何かを追加した場合確認):
、これはパンジェスチャ認識装置である:
、最終的には「BT」コンソール出力:
#0 0x37d2b8a0 in ___forwarding___()
#1 0x37c86680 in __forwarding_prep_0___()
#2 0x318d2f06 in _UIGestureRecognizerSendActions()
#3 0x31864c1c in -[UIGestureRecognizer _updateGestureWithEvent:]()
#4 0x31a90508 in ___UIGestureRecognizerUpdate_block_invoke_0541()
#5 0x317dfd68 in _UIGestureRecognizerApplyBlocksToArray()
#6 0x317de8b6 in _UIGestureRecognizerUpdate()
#7 0x317eb3cc in _UIGestureRecognizerUpdateGesturesFromSendEvent()
#8 0x317eb20e in -[UIWindow _sendGesturesForEvent:]()
#9 0x317eaddc in -[UIWindow sendEvent:]()
#10 0x317d14ec in -[UIApplication sendEvent:]()
#11 0x317d0d2c in _UIApplicationHandleEvent()
#12 0x37a57df2 in PurpleEventCallback()
#13 0x37cfd552 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__()
#14 0x37cfd4f4 in __CFRunLoopDoSource1()
#15 0x37cfc342 in __CFRunLoopRun()
#16 0x37c7f4dc in CFRunLoopRunSpecific()
#17 0x37c7f3a4 in CFRunLoopRunInMode()
#18 0x37a56fcc in GSEventRunModal()
#19 0x317ff742 in UIApplicationMain()
#20 0x00003050 in main (argc=1, argv=0x2fdffaa8)
ありがとうございました! –
もう一度申し訳ありませんか?私はあなたが何を意味しているのかよく理解していませんでした。 –
@ChrisBraunschweilerアップルの「UIWindow」クラスリファレンスドキュメントをチェックしてください。 'rootViewController'プロパティーを探します。 – Danra