0

I have developed an iPhone app where there are four tab bar items and if i press the last TabBar the application should terminate. How to do it in Interface Builder?

Cathy
  • 797
  • 2
  • 14
  • 25
  • 1
    I vaguely remember the Apple guidelines specifically tell you not to have a quit button. Besides the fact that it's not necessary, if you want to get it approved, don't have one. – Beardo Feb 24 '10 at 16:56

3 Answers3

2

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.

Community
  • 1
  • 1
kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
0

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

new soul
  • 322
  • 1
  • 7
0

No vagaries.

Never ever quit the app programmatically.

God of Biscuits
  • 1,312
  • 1
  • 13
  • 27