火力骑士

导航

 

      

    UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100, 200, 200, 40)];    UIColor *color = [UIColor redColor];

    textField.backgroundColor = [UIColor yellowColor];

    

    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"密码" attributes:@{NSForegroundColorAttributeName: color}];

    

    [self.view addSubview:textField];

 

  来自 http://code4app.com/snippets/one/UITextField设置placeholder颜色/537c765e933bf0a0468b525c#s0

     

posted on 2014-07-11 17:09  火力骑士  阅读(341)  评论(0编辑  收藏  举报