UITableView标题视图和searchBar解雇问题。约束问题?

时间:2014-02-06 03:57:23

标签: objective-c uitableview ios7 constraints autolayout

我有一个UISearchBarDisplayController,一个文本字段,以及tableView标题视图中的一个按钮。我试过放......

self.searchBar.translatesAutoresizingMaskIntoConstraints = YES;
viewDidLoad中的

。我已经尝试过设置约束,但是当我关闭displayController时它总是会崩溃,无论是通过点击取消按钮还是点击背景。我收到了错误......

2014-02-05 22:49:16.774 XXXX[3818:60b] *** Assertion failure in -[UITableView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2903.23/UIView.m:8540
2014-02-05 22:49:16.777 XXXX[3818:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after executing -layoutSubviews. UITableView's implementation of -layoutSubviews needs to call super.'
*** First throw call stack:
(0x2fd76e83 0x3a0d36c7 0x2fd76d55 0x3071f0af 0x324fb413 0x32181943 0x3217d167 0x32510231 0x32732d2f 0x327326b7 0x32532ab7 0x325329cf 0x32188413 0x3a5b80af 0x3a5ba9a9 0x2fd415b1 0x2fd3fe7d 0x2fcaa471 0x2fcaa253 0x349e42eb 0x3255f845 0x3b0bd 0x3a5ccab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

0 个答案:

没有答案