Почему мое приложение держать сбой, когда я добавить это в моем AppDelegate ?:Глобальные стили в AppDelegate?
// Change Global Style of the UINavigationBar
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:12.0/255.0 green:109.0/255.0 blue:216.0/255.0 alpha:1.0]];
[[UINavigationBar appearance] setTranslucent:NO];
[[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName]];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName,nil] forState:UIControlStateNormal];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
// Chnage Global TabBar Color w/ Options
[[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor orangeColor], NSForegroundColorAttributeName, nil] forState:UIControlStateNormal];
[[UITabBar appearance] setBarTintColor:[UIColor colorWithRed:12.0/255.0 green:109.0/255.0 blue:216.0/255.0 alpha:1.0]];
[[UITabBar appearance] setTranslucent:NO];
я должен делать это в каждом VC вместо AppDelegate?
Все компилируется, но приложение вылетает с этой ошибкой в консоли:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** Illegal property type, c for appearance setter, _installAppearanceSwizzlesForSetter:
Добавьте контрольную точку исключения и сообщите нам, какая строка вызывает сбой. – Fogmeister