0

I have an information app. I chose to use text views, because I can simply copy information and paste it into a view.

I want the text view to show up properly on the top of the view controller in both portrait mode and landscape mode. The view shows up properly in portrait mode, but some text is cut off when I rotate the iPad to landscape mode.

I should mention I'm using a storyboard. Also, for the benefit of others (myself included,) if there is any code involved, please mention where the code belongs.

3
  • Some prints would be nice. I don't think you have reputation to do that, so just use some site to host them (public folder on dropbox)
    – Rui Peres
    Oct 30, 2012 at 16:24
  • I will post some pictures later, but for now, will someone please help me?
    – user749127
    Oct 30, 2012 at 16:27
  • Sorry I can't, too many could be happening. With a print things can become clear.
    – Rui Peres
    Oct 30, 2012 at 16:29

2 Answers 2

3

Here's your solution: You must simply find out the right configuration of autosizing. That's all. Try it out, by building your project after changing. This should help you.

Enter image description here

2
  • OK, I clicked on the text view, but I don't see "Autosizing" in the Size Inspector.
    – user749127
    Oct 30, 2012 at 18:41
  • OK, so here's why I didn't see it. I didn't see it because Interface Builder uses Auto Layout by default. So, to fix it, I just had to go to the File Inspector and uncheck "Use Auto Layout." Thanks!
    – user749127
    Oct 30, 2012 at 18:53
0

If you are adding the TextView programmatcially then you just need to set the appropiate auto resizing masks like: textView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin, but you might need to play around with the different options to get what you want based on the location of the textview and how you want it to be manipulated when the device is rotated.

1
  • I am not writing it programmatically.
    – user749127
    Oct 30, 2012 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.