显示对话框以倒置旋转iOS应用程序
我正在开发一个应用程序,它必须是颠倒的。 我想向用户显示一个对话框,用户可以接受(这将导致自动旋转)或拒绝 如何使用objective-c显示这样的对话框? 我需要检查info.plist中的纵向模式以及支持的界面方向中的编程模式。对吧?显示对话框以倒置旋转iOS应用程序,ios,dialog,orientation,portrait,Ios,Dialog,Orientation,Portrait,我正在开发一个应用程序,它必须是颠倒的。 我想向用户显示一个对话框,用户可以接受(这将导致自动旋转)或拒绝 如何使用objective-c显示这样的对话框? 我需要检查info.plist中的纵向模式以及支持的界面方向中的编程模式。对吧? 非常感谢您的帮助 为此使用UIAlertController UIAlertController * alert=[UIAlertController alertControllerWithTitle:@"Title" message:@"Message"
非常感谢您的帮助 为此使用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];`
非常感谢你的回答。我当然会的。不幸的是,我被困在旋转看到了吗