This has happened quite a few times.
Application working fine. Then I chose a wrong deleg开发者_运维百科ate for a view Application did not work (expected) So I chose the right delegate for the view Application still not work / load (should have worked though) Quiting Xcode and returning still doesn't fix it. Only thing to do is delete the project and recreate it
Anyone faced the same problem, any clues on how to fix it ?
What I can possibly guess is that your app in iphone simulator store some state (for example: archiving) and then everytime you try to load the app again, it tries to used the saved state. Because the saved state is crashed in some ways, it is usual that your app will always crash, even you upgrade your app with new code
The only way you can try is to delete your app from simulator and reinstall it
Seems likely you've broken the nib file in some way. If it's not too complex, I'd suggest creating a fresh nib and setting your delegate again.
Just to continue what Vodkhang saying is the case.. then do the Clean/Clean all Targets from the Build menu. or delete the application NOT project..
Sometimes it's worth uninstalling the app from the simulator (In the simulator, click-and-hold and tap the "X").
I figured out what was wrong.
When I assigned Files Owner as the delegate to UINavigationItem the "AppDeleagate" stopped pointing to the Files Owner. When I reset the AppDeledate delegate to be Files Owner, it worked fine.
This link helped me figure it out. http://forums.macrumors.com/showthread.php?t=377383
Thank you all, for your help :)
精彩评论