UIAlertController

    // UIAlertControllerStyleAlert 中部弹框
    // UIAlertControllerStyleActionSheet 底部弹框
    // 创建弹框控制器
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"请输入团购信息" message:nil preferredStyle:UIAlertControllerStyleAlert];

    // 添加按钮
    [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]];
    [alert addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
        // 创建模型
        XMGDeal *deal = [[XMGDeal alloc] init];
        deal.title = [alert.textFields[0] text];
        deal.price = [alert.textFields[1] text];
        [self.deals insertObject:deal atIndex:0];

        // 刷新数据
        [self.tableView reloadData];
    }]];

    // 添加文本输入框
    [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
        textField.placeholder = @"请输入团购名字";
    }];
    [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
        textField.placeholder = @"请输入团购价格";
    }];

    // 显示控制器
    [self presentViewController:alert animated:YES completion:nil];