UIAlertView最新写法

2019-03-20  本文已影响0人  Devin_明

 UIAlertController* alert = [UIAlertControlleralertControllerWithTitle:@"是否退出当前账号"message:nilpreferredStyle:UIAlertControllerStyleAlert];

 UIAlertAction* action1 = [UIAlertActionactionWithTitle:@"取消"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction* _Nonnullaction) {

    }];

 UIAlertAction* action2 = [UIAlertActionactionWithTitle:@"确认"style:UIAlertActionStyleDefaulthandler:^(UIAlertAction* _Nonnullaction) {

 DeviceModel*model = [NSStringgetPhoneInfo];

[alert addAction:action1];

[alert addAction:action2];

    [selfpresentViewController:alert animated:YEScompletion:nil];

上一篇 下一篇

猜你喜欢

热点阅读