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

UIAlertView的基本用法

2015-08-18 15:41 585 查看
UIAlertView *alert = [[UIAlertViewalloc]
initWithTitle:@"修改昵称"message:nildelegate:selfcancelButtonTitle:@"取消"otherButtonTitles:@"确定",nil];

alert.alertViewStyle =UIAlertViewStylePlainTextInput;
UITextField *textField = [alert
textFieldAtIndex:0];
textField.textColor =WordDeepColor;
textField.font = [UIFontsystemFontOfSize:14];
textField.placeholder =@"请输入昵称";
[alertshow];

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex ==
1) {
UITextField *textField = [alertView
textFieldAtIndex:0];
self.user.nick = textField.text;

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