开发者

NIB-related crash on iPad but not iPhone

开发者 https://www.devze.com 2023-02-21 07:32 出处:网络
I\'m having a problem I was hoping you could help me with. My app, which is made for iPhone but not iPad, has started crashing when I try to run it on the iPad at all. I get this message:

I'm having a problem I was hoping you could help me with.

My app, which is made for iPhone but not iPad, has started crashing when I try to run it on the iPad at all. I get this message:

*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: 
'[<UIApplication 0x11f0b0开发者_C百科> setValue:forUndefinedKey:]: this class is not key value 
coding-compliant for the key firstLineField.'

firstLineField is a UITextField that is in an XIB file. The stack reveals that this has been called by [UIApplication _loadMainNibFile], before any of my code runs. Do you guys have any ideas what might be happening?

Thanks for your help,

Luke

Addendum: Here's my stack trace.

#0  0x3286ca1c in __pthread_kill
#1  0x304a33ba in pthread_kill
#2  0x3049bbfe in abort
#3  0x35d09a6a in __gnu_cxx::__verbose_terminate_handler
#4  0x365f9072 in _objc_terminate
#5  0x35d07e3c in __cxxabiv1::__terminate
#6  0x35d07e90 in std::terminate
#7  0x35d07f60 in __cxa_throw
#8  0x365f7c8a in objc_exception_throw
#9  0x358a43cc in -[NSException raise]
#10 0x351f3eda in -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:]
#11 0x351ac9ca in _NSSetUsingKeyValueSetter
#12 0x351ac216 in -[NSObject(NSKeyValueCoding) setValue:forKey:]
#13 0x3518e42e in -[NSObject(NSKeyValueCoding) setValue:forKeyPath:]
#14 0x3219b8de in -[UIRuntimeOutletConnection connect]
#15 0x3583cd7a in -[NSObject(NSObject) performSelector:]
#16 0x3583c99c in -[NSArray makeObjectsPerformSelector:]
#17 0x3219a846 in -[UINib instantiateWithOwner:options:]
#18 0x3219be08 in -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:]
#19 0x31fc64cc in -[UIApplication _loadMainNibFile]
#20 0x31fc0b08 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:]
#21 0x31f957d6 in -[UIApplication handleEvent:withNewEvent:]
#22 0x31f95214 in -[UIApplication sendEvent:]
#23 0x31f94c52 in _UIApplicationHandleEvent
#24 0x31e6be76 in PurpleEventCallback
#25 0x3587ba96 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
#26 0x3587d83e in __CFRunLoopDoSource1
#27 0x3587e60c in __CFRunLoopRun
#28 0x3580eec2 in CFRunLoopRunSpecific
#29 0x3580edca in CFRunLoopRunInMode
#30 0x31fbfd48 in -[UIApplication _run]
#31 0x31fbd806 in UIApplicationMain
#32 0x0000294e in main at main.m:13


You have a UITextField that's connected to an outlet property named firstLineField, but this property can't be found in the controller.

Check that firstLineField property is actually defined in the controller class.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号