I have my main view controller, and tapping a button brings up an action sheet. I want one of the options tapped there to bring up an action sheet. I can't seem to figure it out, however, despite all my searching.
I have the following code:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *buttonTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
if ([buttonTitle isEqualToString:@"Text"]) {
AddTextViewController *addTextViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"addTextViewController"];
}
Now that I instantiated the view controller, I don't know what to do.
Add this line right after you instantiate it.
Note
You can also create a custom segue in the Storyboard that presents your view, then instead of instantiating and presenting you can just perform your custom segue. Both work the same.
Storyboard Method
First click your segue in Storyboards, then give it an identifier in the info panel.
Then you can replace your code with this and it should trigger the segue from your Storyboard.