0

I put UISearchBar under UIView as the picture below. The problem is - after finish search or click cancel, UISearchBar will shift to the top, then I get error message:

2014-05-22 15:45:18.663 MyAPP[14402:60b] *** Assertion failure in -[UITableView layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2935.137/UIView.m:8794
2014-05-22 15:45:18.667 MyAPP[14402:60b] WARNING: GoogleAnalytics 3.06 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:49): Uncaught exception: Auto Layout still required after executing -layoutSubviews. UITableView's implementation of -layoutSubviews needs to call super.
2014-05-22 15:45:23.697 MyAPP[14402: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:

Question:

1) Is it possible to fix position of UISearchBar? and How to do that?

2) How to fix the error?

enter image description here enter image description hereenter image description hereenter image description here

April Smith
  • 1,810
  • 2
  • 28
  • 52

0 Answers0