uitextfield 키보드 done 색 바꾸기
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
같은곳에서 예쁘게 하겠다고 기본 시스템 폰트를 변경하면 textfield 터치시 나타나는 키보도의 done 버튼 색도 변하게 됨
이럴때 해당 뷰만 바꿔주려면 appear, disappear에서 바꿔주고 원복시켜주고 하면 됨.
- (void)viewDidAppear:(BOOL)animated {
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor redColor], NSForegroundColorAttributeName,
nil];
[[UIBarButtonItem appearance] setTitleTextAttributes:attributes forState: UIControlStateNormal];
}
- (void)viewDidDisappear:(BOOL)animated {
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor whiteColor], NSForegroundColorAttributeName,
nil];
[[UIBarButtonItem appearance] setTitleTextAttributes:attributes forState: UIControlStateNormal];
}