UIAlertView的基本用法
2015-08-18 15:41
661 查看
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];
}
}
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];
}
}
相关文章推荐
- 黑马程序员_String类型以及StringBuilder
- POJ 1986 DIstance Query LCA水题
- RequireJS Optimizer 的使用和配置
- Reveal UI 分析工具简单使用
- 【Mockplus教程】安装Mockplus
- 【Mockplus教程】界面闪烁花屏怎么办?
- 【Mockplus教程】MAC 安全提示无法安装怎么办?
- Unable to determine the principal end of an association between the types '***. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.
- 【Mockplus教程】为什么 Windows XP 无法安装?
- 【Mockplus视频教程】《10分钟玩转Mockplus》
- IOS UITableView拖动排序功能
- [leetcode] 187.Repeated DNA Sequences
- POJ---2299-Ultra-QuickSort
- ios-用xib和UI table View controller 的团购网站
- GUID全球唯一ID
- android中更新UI的方法
- 1099. Build A Binary Search Tree (30)
- ngui 减少drawcalls方法一
- UINavigationController & UIViewContorller
- IOS-- UIView中的坐标转换