gpt4 book ai didi

iphone - NIB 相关的崩溃在 iPad 但不是 iPhone

转载 作者:行者123 更新时间:2023-11-28 17:46:46 26 4
gpt4 key购买 nike

我遇到了一个问题,希望你能帮我解决。

我的应用程序是为 iPhone 而不是 iPad 开发的,当我尝试在 iPad 上运行它时,它已经开始崩溃了。我收到此消息:

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

firstLineField 是 XIB 文件中的 UITextField。堆栈显示,在我的任何代码运行之前,它已被 [UIApplication _loadMainNibFile] 调用。你们知道会发生什么吗?

谢谢你的帮助,

卢克

附录:这是我的堆栈跟踪。

#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

最佳答案

您有一个连接到名为 firstLineField 的 socket 属性的 UITextField,但在 Controller 中找不到此属性。

检查 firstLineField 属性是否实际定义在 Controller 类中。

关于iphone - NIB 相关的崩溃在 iPad 但不是 iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5524308/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com