iOS 7: UIViewController's back button sometimes displays strangely if the title is updated while the view is visible
| Originator: | robotspacer | ||
| Number: | rdar://15138841 | Date Originated: | 02-Oct-2013 10:55 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.x |
| Classification: | Other Bug | Reproducible: | Always |
UIViewController’s back button sometimes displays strangely if the title is updated when the view is already displayed. For example, it might show "< B" instead of just showing an arrow. Steps to Reproduce: 1. Create a project with a navigation controller that pushes a second view controller. 2. Make sure the view controller has a short title (or none at all) when it first displays its view. 3. Set the second view controller's title property to something fairly long after the view has already appeared. Expected Results: The back button should adjust in the same way that it would if the view had not been displayed yet. For example it should shorten to "< Back" or just "<" and not anything in between. Actual Results: Depending on the text used, the back button will often display as "< B" or even cut off the text in the middle of a letter. It seems to correctly adjust the size of the button, but fails to re-draw it to fit the space. ---- This bug seems to be slightly more specific than I originally thought. The initial view controller apparently has to have a long title as well or the bug isn't triggered. The attached app reproduces the bug (only on iPhone). New steps to reproduce: 1. Launch the app on an iPhone or the iPhone simulator. 2. Tap the + to add a row. 3. Tap on the row and wait a moment. The title will update, and the "< Back" button text gets cut off.
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!