开发者

Why won't the changes i make to my viewcontroller update when i run the app?

I've got a view controller which is part of a navigation controller. When i make changes to it, like move the location of 开发者_开发知识库a button or add another label to the view controller the changes aren't reflected in the app when i run it. The button remains in the same position and the new label isn't there. What am i doing wrong?


I'd try killing the simulator. On some machines that I work on, or perhaps specific projects, the app seems to save some state between building and running. Cmd+q the simulator and try again.


Ok Solved it. There was 2 problems.

1) I reset the Simulator. Go to: iOS Simulator > Reset Content and Settings. This removed the old version of the app from the simulator.

2) Because i changed the default view controller 'rootviewcontroller' to something else, i had to manually remove a reference to rootviewcontroller in the xib file. I did this by opening up the xib in TextEdit and doing a ctrl-F for 'rootviewcontroller'. Not sure if there is an easier way to do this in the Interface Builder, but this worked for me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜