UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"添加" message:nil delegate:self cancelButtonTitle:@"确定" otherButtonTitles: @"取消",nil];
textField = [[UITextField alloc] initWithFrame:CGRectMake(12, 45, 260, 25)];
textField.backgroundColor = [UIColor whiteColor];
[alert addSubview:textField];
CGAffineTransform transfrom = CGAffineTransformMakeTranslation(0, 30); //实现对控件位置的控制
[alert setTransform:transfrom];
[alert show];
[alert release];
本文介绍如何使用UIAlertView并对其进行自定义样式调整,包括设置标题、消息、按钮及添加文本框等操作,并通过CGAffineTransform实现了对话框内控件的位置偏移。

3629

被折叠的 条评论
为什么被折叠?



