tags:

views:

108

answers:

1

how do i programmatically exit a view in an iPhone app

+5  A: 

This is a pretty vague question… I can interpret it a few ways:


1) How do I dismiss a view controller manually in a Navigation Controller

[self.navigationController popViewControllerAnimated:YES];


2) How do I dismiss a modal view controller manually in a Navigation Controller

[self.navigationController dismissModalViewControllerAnimated:YES];


3) Remove a view from the view hierarchy

[theView removeFromSuperview];


4) How do I programmatically exit the app

exit(0);
coneybeare