Andy A
Andy A

Reputation: 236

Why is my text view full of unwanted space? Extra lines not in code. Screenshots

I have a programatically populated storyboard text view.

[textView setFont:[UIFont boldSystemFontOfSize:11.0f]];

    textView.text = @"Why oh why is this happening to me?! This seems like a pretty absurd problem to be having.";

This is how the text box loads. The text box is created between the image you see at the top and the two images you see at the bottom and it fills the whole space in-between.

Shot of how texts looks on loading

How the text box looks if I scroll up (and how I want it to appear). It seems like there are a bunch of unwanted lines populating the text box before my text?!

How the text box looks if I scroll up

So I have tried fixing the height and width of the text box using constraints, I have tried stopping the view scrolling and I have tried setting the content insert parameter of the text box. None of these things helped.

Anyone got any suggestions as to why this is happening?

I'm not sure if this is related, but the only change to this view controller recently has been making the navigation bar translucent.

Upvotes: 2

Views: 511

Answers (1)

Will Jenkins
Will Jenkins

Reputation: 9787

See this question and answer

You need to select the parent view controller and unselect the 'Adjust Scroll View Insets'

:o)

Upvotes: 4

Related Questions