In a tab bar application I made a view controller for the second view. I put in an IBOutlet that is attached to a button. When the button is pressed, I want to return to the main view. This is what I put, but it crashes.
-(IBAction) cancel
{
[self.view removeFromSuperview];
}
How should this be changed?