0

I'm trying to display some text in a UITextView, but it seems to load it in the middle of the textview whereas I'd like it to align via top. I tried following the advice here, but using sizeToFit and my NavContoller's automaticallyAdjustsScrollViewInsets property was already set to NO.

Here's a screenshot (see how there's a bit of text at the bottom):

enter image description here

My code is here:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    // If descLong is not present, use descShort
    if (!self.product.descLong) {
        self.descLong.text = self.product.descLong;
    } else {
        self.descLong.text = self.product.descShort;
    }
    [self.descLong sizeToFit];

}

Any help would be much appreciated!

Thanks, Tim

Community
  • 1
  • 1
tombornal
  • 65
  • 1
  • 1
  • 7

1 Answers1

0

Unchecked "Adjust Scroll View Insets" in the attributes section of storyboard and the issue was fixed.

tombornal
  • 65
  • 1
  • 1
  • 7