Commit 7df67ad1 authored by Carola Nitz's avatar Carola Nitz

AppDelegate: moved Appearance modification into own method

parent 9a883e37
......@@ -107,16 +107,7 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize
name:VLCPasscodeValidated
object:nil];
// Change the keyboard for UISearchBar
[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceDark];
// For the cursor
[[UITextField appearance] setTintColor:[UIColor VLCOrangeTintColor]];
// Don't override the 'Cancel' button color in the search bar with the previous UITextField call. Use the default blue color
[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor colorWithRed:0.0 green:122.0/255.0 blue:1.0 alpha:1.0]} forState:UIControlStateNormal];
// For the edit selection indicators
[[UITableView appearance] setTintColor:[UIColor VLCOrangeTintColor]];
[[UISwitch appearance] setOnTintColor:[UIColor VLCOrangeTintColor]];
[self setupAppearence];
// Init the HTTP Server and clean its cache
[[VLCHTTPUploaderController sharedInstance] cleanCache];
......@@ -212,6 +203,21 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize
return YES;
}
- (void)setupAppearence
{
// Change the keyboard for UISearchBar
[[UITextField appearance] setKeyboardAppearance:UIKeyboardAppearanceDark];
// For the cursor
[[UITextField appearance] setTintColor:[UIColor VLCOrangeTintColor]];
// Don't override the 'Cancel' button color in the search bar with the previous UITextField call. Use the default blue color
[[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], nil] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];
// For the edit selection indicators
[[UITableView appearance] setTintColor:[UIColor VLCOrangeTintColor]];
[[UISwitch appearance] setOnTintColor:[UIColor VLCOrangeTintColor]];
[[UISearchBar appearance] setBarTintColor:[UIColor VLCOrangeTintColor]];
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment