關於在tableView xib的自定義單元格中使用autoLayout,我得到以下錯誤。CustomTableCellView的-layoutSubviews實現需要調用超級,NSInternalInconsistencyException
當在iOS 6中運行模擬器 CustomCells的實現-layoutSubviews的需要調用超
Assertion failure in
-[CustomCells layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2372/UIView
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after executing -layoutSubviews. CustomCells's implementation of -layoutSubviews needs to call super.'
*** First throw call stack:
當iOS 5的模擬器中運行
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The NIB data is invalid.'
*** First throw call stack:
溫度修正:
如果我禁用自定義單元格中的autoLayout,它工作正常。 但在這種情況下方向處理不好。請幫忙。
當過你調用該視圖addSubview調用layoutSubviews 例如: [細胞addSubview:內容查看]。 [cell layoutSubviews]; –
與工作解決方案類似的問題:http://stackoverflow.com/questions/12610783/auto-layout-still-required-after-executing-layoutsubviews-with-uitableviewcel –