计算
控件介绍
文本输入
- 设置键盘格式为NumberPad
- 字符串与数字转换方法 NSInteger num2 =[str2 integerValue];
弹窗控件
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"error" message:@"输入有误" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *action =[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
NSLog(@"取消");
}];
[alert addAction:action];
[self presentViewController:alert animated:YES completion:nil];
UIAlertView errView = [[UIAlertView alloc] initWithTitle:@"error" message:message delegate:nil cancelButtonTitle:@"ok" otherButtonTi