iOS7 - UITextView leaves an extra padding to the top in Storyboard

advertisements

Tools Specification:

  • OS X Yosemite 10.10
  • Xcode 5.1.1

Today I found one weird issue (Or may be if i'm wrong with new specialisation or something else. Please make me correct if anything is wrong).

I created project using Xcode 5.1.1 for iOS 7.1 OS with Storyboard support. Everything here is default. Now just drag and drop UITextView into view of UIViewController (It is embedded in UINavigationController more precisely).

Here all properties of UITextView are default except background color (Change to highlight border of UITextView). I see that the default text in UITextView goes bottom when I change its height. Also left some space on top and than text is rendered. See the below image:

Run application to check this also in simulator. And it shows extra space on the top of UITextView.

I also did the same in Xcode 6.0.1 to double sure that this is not default behaviour. And it is perfect in Xcode 6.0.1, there were no extra space on top of content of UITextView.

Spotlight:

I never did face this issue before. I updated Mac OS Yosemite two days ago (If its relevant to the Mac OS).

Also one thing is to be note that if I remove embedded UINavigationController than it works normal.

So is it related to OS? OR Do I miss something, I mean Apple introduce or change any behaviour?

Note: There is no any constraints. Just drag and drop UITextView to view.


EDIT: Just updated to XCode6.1 and I am building onto iPad with iOS7.1 - THE SAME ISSUE PERSISTS!

I think it is a bug in XCode5.1.1, here is what I found, may be it will help you, it did help me.

EDIT: Hey, just discovered that UITableView does exactly the same, it appears scrolled down if it is 1st in a list in interface builder, same trick cures it.

Here I have my textview 1st in the list in interface builder:

and it is scrolled down when you run the app:

However, if I move my textview below the others:

It shows up in the app all right:

So, just make sure none of the textviews (or tableviews) are 1st in the list in interface builder! Seems like real bug to me, will log it in with Apple.