これにはUIAlertControllerを使用します。
UIAlertController * alert=[UIAlertController
alertControllerWithTitle:@"Title" message:@"Message"preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* yesButton = [UIAlertAction
actionWithTitle:@"Yes, please"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
**//What we write here????????**
NSLog(@"you pressed Yes, please button");
// call method whatever u need
}];
UIAlertAction* noButton = [UIAlertAction
actionWithTitle:@"No, thanks"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
**//What we write here????????**
NSLog(@"you pressed No, thanks button");
// call method whatever u need
}];
[alert addAction:yesButton];
[alert addAction:noButton];
[self presentViewController:alert animated:YES completion:nil];`
ありがとうございました。 – Johan
そうです。残念ながら、私はローテーションについたままです[リンク](https://stackoverflow.com/questions/44305964/programmatically-rotate-ios-app-upside-down-using-objective-c) – Johan