Better API for adding progress view to UINavigationBar and UIToolbar
| Originator: | axiixc | ||
| Number: | rdar://14873059 | Date Originated: | 29-Aug-2013 06:38 PM |
| Status: | Duplicate/14616994 | Resolved: | 11-Sep-2013 05:19 PM |
| Product: | iOS SDK | Product Version: | iOS 7 |
| Classification: | Enhancement | Reproducible: | Not Applicable |
29-Aug-2013 06:38 PM James Savage: SUMMARY: With iOS 7 the format of the UIProgressView control changed for the UIProgressViewStyleBar style. In this new style Apple recommends placing the progress view at the bottom of a navigation bar or top of a toolbar, as seen in Messages, Mail, and Safari. However, UIKit does not expose a readily available method to achieve this style. The only ways I have found involve manually adding the UIProgressView to the bar, managing its frame manually (as attempting to add NSLayoutConstraints to a bar managed by a UINavigationController will result in an exception[1]), and managing the removal, and associated animations, or a navigation controller's back and interactive back transitions. Overall this is a rather large body of work for 3rd party developers to duplicate just to achieve the recommend appearance for a progress view in a bar, and it would be very nice if a simple interface were exposed to make this easier and standardized through the system. [1]: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot modify constraints for UINavigationBar managed by a controller' REGRESSION: Prior to iOS 7, developers could get away with adding a progress view as an item to a toolbar or the titleView of navigation bar, however, in order to span the full width of the bar and not interfere with other items, this strategy no longer works.
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!