您的位置:首页 > 产品设计 > UI/UE

【代码笔记】带输入框的UIAlertView

2015-12-23 09:14 453 查看
一,效果图。





二,代码。



//点击任何处,弹出输入框
-(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];

}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: