一,效果图。
二,代码。
//点击任何处,弹出输入框 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UIAlertView *dialog = [[UIAlertView alloc] initWithTitle:@"请输入分组名称" message:@"\n" delegate:self cancelButtonTitle:@"添加" otherButtonTitles:@"取消",nil]; [dialog setAlertViewStyle:UIAlertViewStylePlainTextInput]; [[dialog textFieldAtIndex:0] setKeyboardType:UIKeyboardTypeNumberPad]; [dialog show]; }
时间: 2024-10-05 22:07:17