ITeye博客

在UIAlertVIew 中 添加 UITextField

helmsman_xcode · 2011-08-15 17:23 · ios-综合基础文章 · 移动开发 · Markdown

  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];

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。