uppercase label in xcode storyboard not wanted

女生的网名这么多〃 提交于 2020-01-03 03:01:19

问题


I'm using xcode 6 with storyboard for ios app development.

I have a problem with UILabel in view controllers in storyboard: the text is simple and inlower case, but when I run the app in the simulator or in the device I see the Label text in UPPERCASE.

Labels have no outlets, and cannot be modified programmatically. some one has a solution? I'd prefer not using IBOutlet and setting text by code..


回答1:


I had somewhat similar problem. In my case everything(title, lables, button texts, etc.) was in upper case. I found out that "Localization Debugging" was on, so when I had language on iphone which was not supported by localization, it turned words automatically to upper case. When I disabled it, everything worked fine again.

Just go to "Product > Scheme > Edit Scheme" and there select "Run" and disable "Localization Debugging". (Sorry, I don't have enough reputation to post images, otherwise I would put here screen)

Hope it helps




回答2:


I answer myself fot other people. Nothing to do with this strange thing. It seems a xcode bug. Sometimes the labels appears uppercased, other times are ok. I discover a trick that was using the attributed text in storyboard. in this way it works correctly. Another way is to use a outlet and setting the uilabel.text by code. Bye



来源:https://stackoverflow.com/questions/28332613/uppercase-label-in-xcode-storyboard-not-wanted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!