自定义UIAlertView
来源:互联网 发布:effective java中文版 编辑:程序博客网 时间:2024/05/22 00:27
- (void)viewDidLoad {
[super viewDidLoad];
/*
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:NSLocalizedString(@"", nil)
message:NSLocalizedString(@"\n\n\n", nil)
delegate:self
cancelButtonTitle:@"注册"
otherButtonTitles:@"登陆",
nil];
//用户名
UILabel *user_name = [[UILabel alloc] initWithFrame:CGRectMake( 20, 25, 60, 25)];
[user_name setBackgroundColor:[UIColor clearColor]];
user_name.lineBreakMode = UILineBreakModeWordWrap;
//user_name.numberOfLines = 0;
[user_name setTextColor:[UIColor whiteColor]];
[user_name setFont:[UIFont systemFontOfSize:15.0]];
user_name.text = @"用户名";
[alertView addSubview:user_name];
[user_name release];
UITextField *name = [[UITextField alloc] initWithFrame:CGRectMake( 80, 25, 180, 25)];
[name setBackgroundColor:[UIColor clearColor]];
[name setBorderStyle:UITextBorderStyleBezel];
name.backgroundColor = [UIColor whiteColor];
name.placeholder = @"User name";
[alertView addSubview:name];
[name release];
//user pass_word
UILabel *pass_word = [[UILabel alloc] initWithFrame:CGRectMake(20, 60, 40,25)];
[pass_word setBackgroundColor:[UIColor clearColor]];
pass_word.lineBreakMode = UILineBreakModeWordWrap;
//pass_word.numberOfLines = 1
[pass_word setTextColor:[UIColor whiteColor]];
[pass_word setFont:[UIFont systemFontOfSize:15.0]];
pass_word.text = @"密 码";
[alertView addSubview:pass_word];
[pass_word release];
UITextField *passwordText = [[UITextField alloc] initWithFrame:CGRectMake( 80, 60, 180, 25)];
[passwordText setSecureTextEntry:YES];
[passwordText setBackgroundColor:[UIColor clearColor]];
[passwordText setBorderStyle:UITextBorderStyleBezel];
passwordText.backgroundColor = [UIColor whiteColor];
passwordText.placeholder = @"pass_word";
[alertView addSubview:passwordText];
[passwordText release];
//buttons
for (UIView *Outlet in [alertView subviews])
{
if(![Outlet isKindOfClass:[UITextField class]]&&![Outlet isKindOfClass:[UILabel class]])
{
UIButton* button = (UIButton*)Outlet;
button.frame = CGRectMake(button.frame.origin.x,100,button.frame.size.width , button.frame.size.height);
}
}
[alertView setTransform:CGAffineTransformMakeTranslation(0, -60)];
[alertView show];
[alertView release];
*/
}
- 自定义UIAlertView
- 自定义UIAlertView
- 自定义UIAlertView
- 自定义UIAlertView
- 自定义UIAlertView
- 自定义UIAlertView
- UIAlertView自定义
- 自定义UIAlertView
- 自定义UIAlertView
- 自定义UIAlertView
- 自定义 UIAlertVIew 背景
- 自定义UIAlertView模态框
- ios 自定义UiAlertView
- 自定义UIAlertView的高度
- 自定义UIAlertView背景
- [原创] 自定义UIAlertView
- ios7 UIAlertView自定义
- ios 自定义UIAlertView
- java.lang.NoSuchMethodError: javax.servlet.JSP.PageContext.getELContext()LJAVAx/el/ELContext
- 安装osg--初学者可参考
- Hibernate 的检索方式
- 大量php session临时文件带来的服务器效率问题
- 虚拟机VMware安装Fedora15/ubuntu 11,要想使用gnome3/unity 要怎么办呢?
- 自定义UIAlertView
- Java (网络编程)
- tarball版CDH3B4 Hadoop安装
- java连接FTPSERVER导致的错误处理方法
- oracle安装sqlplus的help帮助系统
- Android学习笔记之AndroidManifest.xml文件解析
- 软件项目版本号的命名格式(转)
- 再谈如何成为技术领袖——技术不是充分条件
- 为什么编程是独一无二的职业