Xcode storyboard changes not showing on device or

2019-06-25 23:43发布

This is driving me nuts.

My app was running normally and then I don't know what I did but any changes I now make in the storyboard/ IB/ Xibs etc are not updating when I run the app either on real device or simulator. For instance, I changed the textColor of UILabel but when I run the app, the old color still shows both on device or simulator. I am using Xcode Version 7.3.1.

Please help. Thanks

5条回答
等我变得足够好
2楼-- · 2019-06-26 00:07

When you have the simulator open.

  1. Click and hold down your app icon
  2. When you seen the icons shaking and "X" in their Top Left, Click to delete it
  3. Do the same for any other App Icons you may have showing in the Simulator Home screen
  4. In Simulator menu at top - Click "HardWare" -- "Home" to stop icons shaking
  5. In same menu Click "HardWare" -- "Reboot" (Wait for this to complete)
  6. Quit Simulator from its menu "Quit Simulator"

(nb: when using device to run app, I would delete it from app as well)

Then Go back to Xcode

  1. click in to menu "Product" -- "Clean"
  2. Quit Xcode and open up again
  3. Run Simulator on the iPhone Simulator Size you just cleaned out (above)

I've tried to simulate the issue you're having but unable to, however, when I have any issues on running my apps, the above seems to work.

[ Sometimes Xcode can be a bit slow, so I tend to wait a few seconds to confirm it / Xcode has actioned it, as I sometimes used the keyboard too fast for it to keep up.]

Hope this helps!

查看更多
姐就是有狂的资本
3楼-- · 2019-06-26 00:12

When my Main.storyboard was not saving (its file icon remained grey after clean+build), I found that running git add -u and git commit -m "//your comment" in my terminal would change the Main.storyboard file icon to yellow again (not grey)

查看更多
时光不老,我们不散
4楼-- · 2019-06-26 00:12

Try removing all constraints from the changes you made and then reapply them. That is what worked for me.

查看更多
Ridiculous、
5楼-- · 2019-06-26 00:13

This solution had worked for me:

Just delete that storyboard in which changes are not reflecting and take new storyboard instead it will start reflecting changes.

查看更多
三岁会撩人
6楼-- · 2019-06-26 00:20

Hopefully to save someone some frustration, I had this same problem and figured out that I must have accidentally hit Command+d while trying to copy something and duplicated the scene. The duplicate was laid perfectly over the original so I couldn't tell I was editing the duplicate instead of the actual scene linked to my navigation controller. I was so focused on the problem I didn't notice the new warning for an unreachable scene in my storyboard.

查看更多
登录 后发表回答