Search code examples
ioscocoa-touchuiviewlandscapeuifont

fill UIView with large sized text on the iPhone in Landscape


I have put my iPhone app in landscape mode and I want to put a message in one of my views that fills the screen. As of now a 6, 10 or 12 character message only goes up to about 12 point font in portrait view in interface builder. When I build and the iPhone simulator switches to landscape the font size stays the same as in portrait and doesn't fill the view.


Solution

  • I think you need to detect the rotation and resize your UIView's frame accordingly.. I'm not sure if you're using a label, webview, etc.. to display this text, but resizing the UIView and the item displaying the text should cause a smooth 'text-fill'