开发者

How to terminate an iPhone application through a TabBaritem in Interface Builder?

I have developed an iPhone app where th开发者_Go百科ere are four tab bar items and if i press the last TabBar the application should terminate. How to do it in Interface Builder?


Terminating the app must involve code. It can’t be done simply in IB. And there’s no documented and clean way to quit the app besides exit(0), see one of the previous questions on this topic.


In the action you can write "[[UIApplication sharedApplication] terminateWithSuccess];" And in the head file you add "@interface UIApplication (extended) -(void) terminateWithSuccess; @end"


No vagaries.

Never ever quit the app programmatically.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜