开发iOSAPP在iOS8中textField的没问题,约束也正常,换到iOS7的模拟器结果报错报错信息为AutoLayoutstillrequiredafterexecuting-layoutSubviews.UITextField'simplementationof-layoutSubviewsneedstocallsuper.'界面一共有两个textField,点击任意一个都会触发这个bug,导致程序崩溃.请问应该怎么解决?另附堆栈信息***Firstthrowcallstack:(0CoreFoundation0x000000010cdc5495exceptionPreprocess+1651libobjc.A.dylib0x000000010c7bb99eobjc_exception_throw+432CoreFoundation0x000000010cdc531a+[NSExceptionraise:format:arguments:]+1063Foundation0x000000010c357f19-[NSAssertionHandlerhandleFailureInMethod:object:file:lineNumber:description:]+1894UIKit0x000000010d0dfa3a-[UIView(CALayerDelegate)layoutSublayersOfLayer:]+5215QuartzCore0x000000010c1f7802-[CALayerlayoutSublayers]+1516QuartzCore0x000000010c1ec369_ZN2CA5Layer16layout_if_neededEPNS_11TransactionE+3637QuartzCore0x000000010c1ec1ea_ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE+248QuartzCore0x000000010c15ffb8_ZN2CA7Context18commit_transactionEPNS_11TransactionE+2529QuartzCore0x000000010c161030_ZN2CA11Transaction6commitEv+39410UIKit0x000000010d07e024_UIApplicationHandleEventQueue+1091411CoreFoundation0x000000010cd54d21__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION+1712CoreFoundation0x000000010cd545f2__CFRunLoopDoSources0+24213CoreFoundation0x000000010cd7046f__CFRunLoopRun+76714CoreFoundation0x000000010cd6fd83CFRunLoopRunSpecific+46715GraphicsServices0x000000010f42df04GSEventRunModal+16116UIKit0x000000010d07fe33UIApplicationMain+101017YCPai0x000000010a863affmain+11118libdyld.dylib0x000000010e37c5c9start+119???0x00000000000000010x0+1)libc++abi.dylib:terminatingwithuncaughtexceptionoftypeNSExceptionMessagefromdebugger:Terminatedduetosignal6
2 回答
哆啦的时光机
TA贡献1779条经验 获得超6个赞
AutoLayoutstillrequiredafterexecuting-layoutSubviews.UITextField'simplementationof-layoutSubviewsneedstocallsuper.光看错误信息的话你应该是-(void)layoutSubviews{//[superlayoutSubviews];缺少这一行代码}
添加回答
举报
0/150
提交
取消