UIActionSheet with only a Cancel button crashes iOS 8
| Originator: | brock | ||
| Number: | rdar://17179485 | Date Originated: | June 5, 2014 |
| Status: | Duplicate | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.0 (12A4265u) |
| Classification: | Reproducible: | Always |
Summary: If a UIActionSheet is displayed with no buttons other than Cancel, the app crashes. Steps to Reproduce: 1. Create a simple app with a button connected to an IBAction method. 2. In that method, create a UIActionSheet object using the plain `init` method. 3. Add a cancel button to the action sheet. 4. Display the action sheet, and the app crashes Expected Results: Uncertain. Perhaps this should just display a cancel button; perhaps it should do nothing. Actual Results: App crashes with: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected use of internal layout attribute' Version: 8.0 (12A4265u) Notes: The attached project demonstrates the bug. See comments in ViewController.m. In the current state, this app will crash when the button is clicked in the UI. If you uncomment one of the calls to `addButtonWithTitle`, the app runs fine. Configuration: iOS Simulator Attachments: 'ActionSheetCrash.zip' was successfully uploaded.
Comments
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!