2010-11-26 3 views
0

Я пытаюсь использовать UIModalPresentationFormSheet в моем приложении Ipad, но он не подходит как правильный выбор в intellisense, и я думаю, что это должно произойти. Недавно я загрузил новую версию xCode и, похоже, имеет только 4.2, а не 3.2 SDK - это моя проблема?UIModalPresentationFormSheet не вариант для iPad iPad 4.2?

Вот мой код, который я хочу бежать, но он выходит из строя:

SignatureViewController *targetController = [[SignatureViewController alloc] init]; 
targetController.modalPresentationStyle = UIModalPresentationFormSheet; 
[self presentModalViewController:targetController animated:YES]; 

Кажется достаточно просто.

EDIT: Вот отчет аварии:

-[PreviewOrderViewController signOrder]: unrecognized selector sent to instance 0x4ec75f0 
2010-11-26 19:30:48.885 RepZioCoreData[37642:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PreviewOrderViewController signOrder]: unrecognized selector sent to instance 0x4ec75f0' 
*** Call stack at first throw: 
(
    0 CoreFoundation      0x0132cbe9 __exceptionPreprocess + 185 
    1 libobjc.A.dylib      0x014815c2 objc_exception_throw + 47 
    2 CoreFoundation      0x0132e6fb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 
    3 CoreFoundation      0x0129e366 ___forwarding___ + 966 
    4 CoreFoundation      0x0129df22 _CF_forwarding_prep_0 + 50 
    5 UIKit        0x003a8a6e -[UIApplication sendAction:to:from:forEvent:] + 119 
    6 UIKit        0x004371b5 -[UIControl sendAction:to:forEvent:] + 67 
    7 UIKit        0x00439647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527 
    8 UIKit        0x004381f4 -[UIControl touchesEnded:withEvent:] + 458 
    9 UIKit        0x003cd0d1 -[UIWindow _sendTouchesForEvent:] + 567 
    10 UIKit        0x003ae37a -[UIApplication sendEvent:] + 447 
    11 UIKit        0x003b3732 _UIApplicationHandleEvent + 7576 
    12 GraphicsServices     0x01a22a36 PurpleEventCallback + 1550 
    13 GraphicsServices     0x01a22abd PurpleEventSignalCallback + 42 
    14 CoreFoundation      0x0130e01f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 
    15 CoreFoundation      0x0126c28b __CFRunLoopDoSources0 + 571 
    16 CoreFoundation      0x0126b786 __CFRunLoopRun + 470 
    17 CoreFoundation      0x0126b240 CFRunLoopRunSpecific + 208 
    18 CoreFoundation      0x0126b161 CFRunLoopRunInMode + 97 
    19 GraphicsServices     0x01a21268 GSEventRunModal + 217 
    20 GraphicsServices     0x01a2132d GSEventRun + 115 
    21 UIKit        0x003b742e UIApplicationMain + 1160 

ответ

0

[PreviewOrderViewController signOrder] это ваша проблема прямо там, а не UIModalPresentationFormSheet.

Метод signOrder не существует в PreviewOrderViewController

+0

но она существует, это странная часть. Что-то странное произошло, и я убью то, что у меня есть, и попробую еще раз. – Slee 2010-11-27 01:08:37

0

Еще работает для меня, UIViewController Class Reference

SignatureViewController *targetController = [[SignatureViewController alloc] init]; 
[targetController setModalTransitionStyle:UIModalTransitionStyleCoverVertical]; 
[targetController setModalPresentationStyle:UIModalPresentationFormSheet]; 
[self presentModalViewController:targetController animated:YES]; 
[targetController release]; 

случайно, что ваш SignatureViewController? UIViewController?

Кроме того, можете ли вы предоставить некоторый выход сбоя, генерируемый Xcode?

Смежные вопросы