Text in an Attributed UITextView isn't formatted on iOS6

201 views Asked by At

Using Xcode 5.1.1, iOS SDK 7.1, this problem can be reproduced as follows:

  • Create a new single view project
  • In the main storyboard, add a Text View and make it of type Attributed in the Attributes Inspector
  • Set the text to be something like "test text", and format the second word to be bold, so that it reads "test text"".
  • Run the app in the simulator

On the iOS7 simulator, the text is shown with the proper formatting. However, if you set the project Deployment Target to be iOS6 and run this on the iOS6 simulator, the formatting is lost.

I need to be able to set this in the storyboard or XIB itself, not in code, since I have to copy and paste a lot of formatted text.

Is this an Xcode/iOS6 bug or am I doing something wrong?

1

There are 1 answers

0
Balazs Nemeth On

Did you try to set the given view compatibility to iOS6 (click to the view of the controller and then check the File Inspector)?

enter image description here