改变输入框的placehould的颜色 和边框颜色

UIColor *color = [UIColor whiteColor];

    _usernameTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入账号" attributes:@{NSForegroundColorAttributeName: color}];

 

#import <QuartzCore/QuartzCore.h>

 

 //改变输入框的边框颜色和样式

    _numberTF.layer.borderColor = [[UIColor whiteColor]CGColor];

    _numberTF.layer.borderWidth = 0.8;

    _numberTF.layer.cornerRadius = 8.0f;

    _numberTF.layer.masksToBounds = YES;

 

 

 

 

附带找window的跟视图控制器

UIWindow *window = [UIApplication sharedApplication].keyWindow;

    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:loginVC];

    window.rootViewController = nav;

posted @ 2016-06-02 11:41  我叫小小虎  阅读(458)  评论(0编辑  收藏  举报