iOS开发 -- 更改placeholder的字体颜色、大小


 self.User = [[LTView alloc]initWithFrame:CGRectMake(10, 100, 295, 40)];
        _User.textFiled.placeholder = @"Please Input Your Name";

核心代码

     [_User.textFiled setValue:[UIColor grayColor] forKeyPath:@"_placeholderLabel.textColor"];
        [_User.textFiled setValue:[UIFont boldSystemFontOfSize:15] forKeyPath:@"_placeholderLabel.font"];
      _User.lable.text = @"Name";
        [self addSubview:_User];
        [_User release];

你可能感兴趣的:(字体,ios开发,placeholde,颜色大小)