How can I force UIAlertView to display the full message without scrolling when in landscape mode?
ios, ios7, objective-c, uialertview, uiscrollview
Solution
- It displays on 2 lines because with the new iOS7 style it doesn't fit. There is increased padding, and even without the padding, the new iOS 7 dynamic type kit font sizes prevents you from having any sizing guarantees.
- You can't, not without making your own custom UIView, making it look similar but decreasing the padding and locking the font sizes.
- The style of the whole OS changed. Although I am surprised they increased the padding so much. I guess with the dynamic font sizes they weren't too worried about keeping backward compatible layouts.
Problem
I have an app that prompts a user for input using a UIAlertView. The app is locked in landscape mode so the space that the UIAlertView has to grow in size is limited. In iOS 5 and 6, the two UIAlertViews I created were able to display their titles and messages without forcing the user to scroll inside the UIAlertView to see the full message. However, in iOS 7, the exact same alerts (meaning the text remained the same), the user has to scroll to display the full message. Here are the alerts as displayed in iOS 7: Interestingly enough though, there is enough room to display the full message in at least the 1st alert. Below is an image of the 1st alert after being scrolled a little. In the second alert view, the whole message does not fit, even after scrolling, because the message takes up two lines. However, in iOS 6, the message took up only one line. My questions are: - In the case of the second alert, why does the message display on two lines in iOS 7 and how can I prevent that from happening? - How can I force UIAlertView to display the full message without scrolling when in landscape mode? - Why did the behavior of UIAlertView change in iOS 7?