ios - I have a UITableViewController that presents a UIActionSheet, how do I make an action sheet option bring up a modal view? -
i'm having lot of trouble this, , can't seem find answer situation.
i have uitableviewcontroller has button, upon being clicked presents uiactionsheet few options. want 1 of options bring view controller have present in storyboard, ready shown.
the uiactionsheet implemented, actionsheet:clickedbuttonatindex: well, don't know within it.
i tried having within it:
nsstring *buttontitle = [actionsheet buttontitleatindex:buttonindex]; if ([buttontitle isequaltostring:@"text"]) { addtextviewcontroller *addtextviewcontroller = [self.storyboard instantiateviewcontrollerwithidentifier:@"addtextviewcontroller"]; [self presentviewcontroller:addtextviewcontroller animated:yes]; } but error saying: no visible @interface 'rootviewcontroller' declares selector 'presentviewcontroller:animated: that's not working either.
what supposed doing here?
there no such method presentviewcontroller:animated:. method presentviewcontroller:animated:completion:.
so change:
[self presentviewcontroller:addtextviewcontroller animated:yes]; to:
[self presentviewcontroller:addtextviewcontroller animated:yes completion:nil]; pass in actual completion block if desired.
Comments
Post a Comment