App terminating when button clicked
I am very new to iphone coding.
I followed this tutorial to make a button in an app, but instead of having it change the background colour in the app, I made it a weblink using:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.apple.com"]];
This all works find when doing it in a "Window based application", but if I follow the e开发者_StackOverflow中文版xact same guide when putting a button into a Tab Bar Application I run into trouble.
The app builds fine, but when I click the button the application just terminates.
Any ideas?
We'd need some actual code to really debug the matter but EXC_BAD_ACCESS means you're trying to access an object that has already been deallocated from memory.
精彩评论