UIAlertView ios9 开始废弃 使用UIAlertController弹框提示


    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"更新" preferredStyle:UIAlertControllerStyleAlert];

    UIAlertAction *defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

        NSLog(@"点击取消了");

    }];

    [alert addAction:defaultAction];

    [self presentViewController:alert animated:YES completion:nil];

你可能感兴趣的:(技术博客)