私はこれに多くの問題を抱えており、この状況に対する具体的な答えを見つけることができないようです.
ボタンを持つ UITableViewController があり、クリックすると UIActionSheet にいくつかのオプションが表示されます。オプションの 1 つを使用して、ストーリーボードに既に表示されている別のビュー コントローラーを表示する準備ができていることを望みます。
UIActionSheet は完全に実装されており、そのactionSheet:clickedButtonAtIndex:
中で何をすべきかわかりません。
私はその中にこれを入れてみました:
NSString *buttonTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
if ([buttonTitle isEqualToString:@"Text"]) {
AddTextViewController *addTextViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"addTextViewController"];
[self presentViewController:addTextViewController animated:YES];
}
しかし、次のようなエラーが表示No visible @interface for 'RootViewController' declares the selector 'presentViewController:animated:
されるので、それも機能していません。
私はここで何をしているのですか?