弹框
// initWithTitle:标题
// message:详细信息
// delegate:代理
// cancelButtonTitle:取消按钮文字
// otherButtonTitles:其他按钮文字
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"输入的数字不合理" delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
//// 2.2弹出弹框
[alert show];
// ios8的弹框
// 2.3IOS8创建弹框
// alertControllerWithTitle:表示标题
// message:信息
// preferredStyle:表示弹框的样式
// UIAlertController *alertvc =[UIAlertController alertControllerWithTitle:@"提示" message:@"输入的数子不合理" preferredStyle:UIAlertControllerStyleAlert];
//
//// 2.4添加弹框按钮
//// addAction:表示添加按钮
////
//
// [alertvc addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]];
////
//// 2.5 弹出弹框
// [self presentViewController:alertvc animated:YES completion:nil];
//