UITextView - setting font not working with iOS 6 on XCode 5

后端 未结 12 1747
旧时难觅i
旧时难觅i 2020-11-27 16:14

I\'m using storyboards for my UI. I was previously using XCode 4.6 and released on iOS 6. I have since updated to iOS 7 using XCode 5 and updated the Storyboard to work nice

12条回答
  •  北海茫月
    2020-11-27 16:40

    Code for swift:

    textOutlet.editable = true
    textOutlet.textColor = UIColor.whiteColor()
    textOutlet.font = UIFont(name: "ArialMT", size: 20)
    textOutlet.editable = false
    

    Or if you change the text first it magically gets solved

    textOutlet.text = "omg lol wtf"
    textOutlet.textColor = UIColor.whiteColor()
    textOutlet.font = UIFont(name: "ArialMT", size: 20)
    

提交回复
热议问题