Storyboard doesn't apply changes after using Base Internationalization

寵の児 提交于 2019-12-02 08:04:33

问题


I'm localizing my app. I have already accomplished Use Base Internationalization and added 1 set language of files: MainStoryboard.strings (French) & InfoPlist.strings (French) which works fine.

My problem is that any changes I now make to the MainStoryboard.storyboard (like changing a label field font color) do not reflect the change when I run the app.

What am I doing wrong? Can you not change the storyboard attributes once you have done the use base internationalization?


回答1:


Xcode will compile your storyboard to something like MainStoryboard.storyboardc and store the storyboardc file in

<Your app folder>/Build/Products/Debug-iphonesimulator/<Your app name>.app/Base.lproj/MainStoryboard.storyboardc

I believe there is a bug in the mechanism of Base Internationalization, which makes Xcode just use the old storyboardc rather than compile a new one. Thus, your changes to storyboard will not appear after using Base Internationalization.

To solve it, just remove the Build folder.

 rm -rf Build/

Xcode will compile storyboard again after deleting the folder.

If it still doesn't work, you may need to reset your simulator.



来源:https://stackoverflow.com/questions/17527530/storyboard-doesnt-apply-changes-after-using-base-internationalization

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