简体   繁体   中英

how to work on UISplitviewController in ipad

i am using iphone xcode 3.2.5 when i am run my app it show me this error but it show only first time if i run second time it run proper why this happen and what to do to solve this

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'UISplitViewController is only supported when running under UIUserInterfaceIdiomPad' * Call stack at first throw: ( 0 CoreFoundation 0x00e57be9 exceptionPreprocess + 185 1 libobjc.A.dylib
0x00fac5c2 objc_exception_throw + 47 2 CoreFoundation
0x00e10628 +[NSException raise:format:arguments:] + 136 3
CoreFoundation 0x00e1059a +[NSException raise:format:] + 58 4 UIKit
0x005cc37a -[UISplitViewController _commonInit] + 165 5 UIKit
0x005cc7d9 -[UISplitViewController initWithCoder:] + 92 6 UIKit
0x005aa9e4 UINibDecoderDecodeObjectForValue + 2592 7 UIKit
0x005ab693 -[UINibDecoder decodeObjectForKey:] + 398 8 UIKit
0x0037c114 -[UIViewController initWithCoder:] + 513 9 UIKit
0x00386abe -[UINavigationController initWithCoder:] + 58 10 UIKit 0x005aa9e4 UINibDecoderDecodeObjectForValue + 2592 11 UIKit
0x005ab693 -[UINibDecoder decodeObjectForKey:] + 398 12 UIKit
0x0032a0d1 -[UINavigationBar initWithCoder:] + 445 13 UIKit
0x005aa9e4 UINibDecoderDecodeObjectForValue + 2592 14 UIKit
0x005ab693 -[UINibDecoder decodeObjectForKey:] + 398 15 UIKit
0x0032957b -[UINavigationItem initWithCoder:] + 520 16 UIKit
0x005aa9e4 UINibDecoderDecodeObjectForValue + 2592 17 UIKit
0x005ab693 -[UINibDecoder decodeObjectForKey:] + 398 18 UIKit
0x0037c0d5 -[UIViewController initWithCoder:] + 450 19 UIKit
0x004d1f38 -[UITableViewController initWithCoder:] + 64 20 UIKit
0x004c4265 -[UIClassSwapper initWithCoder:] + 237 21 UIKit
0x005aa9e4 UINibDecoderDecodeObjectForValue + 2592 22 UIKit
0x005ab693 -[UINibDecoder decodeObjectForKey:] + 398 23 UIKit
0x004c3f08 -[UIRuntimeConnection initWithCoder:] + 153 24 UIKit
0x005aa9e4 UINibDecoderDecodeObjectForValue + 2592 25 UIKit
0x005aa2dc UINibDecoderDecodeObjectForValue + 792 26 UIKit
0x005ab693 -[UINibDecoder decodeObjectForKey:] + 398 27 UIKit
0x004c3200 -[UINib instantiateWithOwner:options:] + 804 28 UIKit
0x004c5081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168 29 UIKit
0x002cf943 -[UIApplication _loadMainNibFile] + 172 30 UIKit
0x002d04ca -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291 31 UIKit 0x002dadb2 -[UIApplication handleEvent:withNewEvent:] + 1533 32 UIKit 0x002d3202 -[UIApplication sendEvent:] + 71 33 UIKit
0x002d8732 _UIApplicationHandleEvent + 7576 34 GraphicsServices
0x016faa36 PurpleEventCallback + 1550 35 CoreFoundation
0x00e39064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52 36 CoreFoundation 0x00d996f7 __CFRunLoopDoSource1 + 215 37 CoreFoundation 0x00d96983 __CFRunLoopRun + 979 38 CoreFoundation 0x00d96240 CFRunLoopRunSpecific + 208 39 CoreFoundation
0x00d96161 CFRunLoopRunInMode + 97 40 UIKit
0x002cffa8 -[UIApplication _run] + 636 41 UIKit
0x002dc42e UIApplicationMain + 1160 42 People
0x00002328 main + 102 43 People
0x000022b9 start + 53 ) terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”.

You can't use UISplitViewController on iPhone, it's iPad-only feature.

The UISplitViewController class is a container view controller that manages the presentation of two side-by-side view controllers. You use this class to implement a master-detail interface, in which the left-side view controller presents a list of items and the right-side presents details of the selected item. Split view controllers are for use exclusively on iPad devices. Attempting to create one on other devices results in an exception.

- UISplitViewController Class Reference .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM