Storyboard doesn't apply changes after using B

2020-04-23 05:45发布

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条回答
迷人小祖宗
2楼-- · 2020-04-23 05:58

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.

查看更多
登录 后发表回答