1.
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"title" message:@"message" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
[alertView show];
2.
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"idStr" message:@"" preferredStyle:UIAlertControllerStyleAlert];
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField){
textField.placeholder = @"123";
}];
UIAlertAction *cancleAction = [UIAlertAction actionWithTitle:@"cnacle" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
self.makeupId = @"";
}];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
UITextField *idTextField = alertController.textFields.firstObject;
NSString *idStr = idTextField.text;
}];
[alertController addAction:cancleAction];
[alertController addAction:okAction];
[self presentViewController:alertController animated:YES completion:nil];