开发者

App terminating when button clicked

开发者 https://www.devze.com 2023-01-31 10:41 出处:网络
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:

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.

0

精彩评论

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

关注公众号