Auto Layout exception when canceling a UISearchBar contained within a UITableView header view

Originator:ChuckMitchell
Number:rdar://15838443 Date Originated:16-Jan-2014 05:16 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0.1
Classification:Crash Reproducible:Always
 
Working around #15838198, I encountered an exception:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after executing -layoutSubviews. UITableView's implementation of -layoutSubviews needs to call super.'


When I add a width constraint to my search bar to prevent it from shrinking horizontally (Select search bar in Builder, Click Editor -> Pin -> Width)

The search bar does not resize anymore, and the cancel button is clickable, but I get the attached exception. (See exception.txt)

Steps to Reproduce:
1. Build and run sample app  attached.
2. Select the search bar and then click cancel.

Expected Results:
Return to the table view.

Actual Results:
Crash with exception in UITableView.

Version:
iOS 7.0.1
iOS 7.1.b3

Notes:


Configuration:
XCode 5 simulator, and on device.

Attachments:
'exception.txt' and 'TBLTableSearchExample.zip' were successfully uploaded.

Comments

Apple marked this as a duplicate of 14276236

By ChuckMitchell at Jan. 22, 2014, 6:17 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!