{"id":8,"date":"2014-02-06T20:13:59","date_gmt":"2014-02-06T20:13:59","guid":{"rendered":"http:\/\/dev.fruitbyte.com\/?p=8"},"modified":"2014-02-06T20:16:03","modified_gmt":"2014-02-06T20:16:03","slug":"uitextview-bug-in-ios-7-0","status":"publish","type":"post","link":"http:\/\/dev.fruitbyte.com\/?p=8","title":{"rendered":"UITextView bug in iOS 7.0"},"content":{"rendered":"<p>Just stumbled upon an amusing bug in iOS 7. UITextView refused to change font size and color in Storyboard and xib files. Those storyboards were converted from iOS 5 format long time ago and so far I have not had any incompatibility issues until now. Whatever I was trying, UITextView controls did not want to change the font!<\/p>\n<p>After hours of random experiments and googling I&#8217;ve found a workaround. Change font and color programmatically, but&#8230; you have to make UITextView editable first. You&#8217;ve heard that right. So code should look like this:<\/p>\n<p><code><\/p>\n<p>textView.editable = YES;<br \/>\ntextView.font = [UIFont fontWithName:@\"Arial\" size:24];<br \/>\ntextView.editable = NO;<\/p>\n<p><\/code><\/p>\n<p>P.S. Thanks Apple for all wasted hours!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just stumbled upon an amusing bug in iOS 7. UITextView refused to change font size and color in Storyboard and xib files. Those storyboards were converted from iOS 5 format long time ago and so far I have not had &hellip; <a href=\"http:\/\/dev.fruitbyte.com\/?p=8\"><em>Continue&nbsp;reading&nbsp;<span class=\"meta-nav\">&rarr;<\/span><\/em><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[12,6,7,10,9,11],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-bugs","category-ios","tag-interface-designer","tag-mobile-apps","tag-software","tag-storyboard","tag-xcode","tag-xib"],"_links":{"self":[{"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8"}],"version-history":[{"count":2,"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":10,"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=\/wp\/v2\/posts\/8\/revisions\/10"}],"wp:attachment":[{"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dev.fruitbyte.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}