uiappearance

MKMapview Affecting UINavigationBar and TabBar Appearance

我只是一个虾纸丫 提交于 2019-12-01 04:00:14
I have a MKMapView in a UIView. Never any issues until iOS7. My colors for UITabbar and UINavigationBars are set by UIAppearance Protocol. For some reason whenever the MKMapView is initiated, all my tabbars and navbars reset, ignoring the barTintColor setting of my appearance class. All other settings from UIAppearance seem to remain such as title attributes and barItem attributes. Only barTintColor goes out. One more thing. This only happens on iPhone 4 and iPhone4S, not on iPhone 5. It does not happen on the simulator either. Was not an issue in iOS6 at all. I can find no other cause for the

Customized back button appears on UIImagePickerController

十年热恋 提交于 2019-12-01 03:50:11
问题 I use the following code to customize the back button on the navigation bar throughout my application: UIImage *backButton = [[UIImage imageNamed:@"backButton"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; UIImage *backButtonOn = [[UIImage imageNamed:@"backButton_on"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)]; [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButton forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UIBarButtonItem

tvos: UITextView focus appearance like movies App

一个人想着一个人 提交于 2019-12-01 03:45:37
问题 I am building a tvos app and i want the UITextView to behave similarly like in tvos Movies app. I am specially interested in the focused appearence. Please have a look ate these two pictures. Currently i am just adding background color to the textview when it is focused but how i can achieve this focused appearance in the attached images. here is my small code override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator

UINavigationBar Appearance on Modal Not Setting

爷,独闯天下 提交于 2019-12-01 03:23:37
I am using the following code in my appDelegate to set the appearance of my UINavigationBar and status bar throughout my app: [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; This code correctly sets the appearance of everything to white everywhere except when a third-party modal viewController is prevented, such as from the Dropbox API or the Mail/Message viewController from a

MKMapview Affecting UINavigationBar and TabBar Appearance

坚强是说给别人听的谎言 提交于 2019-12-01 01:23:30
问题 I have a MKMapView in a UIView. Never any issues until iOS7. My colors for UITabbar and UINavigationBars are set by UIAppearance Protocol. For some reason whenever the MKMapView is initiated, all my tabbars and navbars reset, ignoring the barTintColor setting of my appearance class. All other settings from UIAppearance seem to remain such as title attributes and barItem attributes. Only barTintColor goes out. One more thing. This only happens on iPhone 4 and iPhone4S, not on iPhone 5. It does

UIApperance and various crashes

我只是一个虾纸丫 提交于 2019-12-01 00:44:20
I'm getting so frustrated while customizing my app. I've already created and styled almost the whole app, including Navigation bar, toolbar, tabBar etc, but everytime a MFMailComposeViewController, a MFMessageComposerViewController, Twitter or Facebook sharers or even a QuickLook View Controller comes in play, the app crashes with the message: *** Assertion failure in -[UICGColor encodeWithCoder:]. *** Terminating app due to uncaught exception 'NSInternalInconsistencyExceptionì, reason: 'Only RGBA or White color spaces are supported in this situation.' I've read around that this is because iOS

UINavigationBar Appearance on Modal Not Setting

六眼飞鱼酱① 提交于 2019-11-30 23:33:22
问题 I am using the following code in my appDelegate to set the appearance of my UINavigationBar and status bar throughout my app: [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; This code correctly sets the appearance of everything to white everywhere except when a third-party modal

Using UIAppearance and switching themes

孤街浪徒 提交于 2019-11-30 18:02:29
问题 I'm looking to theme my iOS app and have been reading up on UIAppearance. I want the user to be able to switch between a number of different visual themes from within the app. Changing a theme would then be shown in the UI. I'm thinking I could have a theme file that is a singleton loaded within the appDelegate.m. But after that i'm a little stuck on how this could be implemented? 回答1: UIKit sets properties from UIAppearance proxy after view is added to views hierarchy. In UISS I use method

UIAppearance setTranslucent error: Illegal property type, c for appearance setter, _installAppearanceSwizzleForSetter

て烟熏妆下的殇ゞ 提交于 2019-11-30 17:28:45
Trying out iOS 7 did: [[UINavigationBar appearance] setTranslucent:NO]; Got crash and error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** Illegal property type, c for appearance setter, _installAppearanceSwizzleForSetter:' *** First throw call stack: (0x16ad9b8 0x142e8b6 0x16ad7ab 0x72163d 0x724c34 0x169daca 0x169d8de 0x6c09 0x228ea9 0x2296e9 0x22ab5e 0x240a6c 0x240fd9 0x22c7d5 0x35a4906 0x35a4411 0x16293e5 0x162911b 0x1653b30 0x165310d 0x1652f3b 0x22a2b1 0x22c4eb 0x6f3d 0x1d0d725) libc++abi.dylib: terminating with uncaught exception of type

respondsToSelector fails for appearance proxy

醉酒当歌 提交于 2019-11-30 17:09:44
I’m trying to detect an iOS 6-specific appearance method, by running respondsToSelector on the [UIBarButtonItem appearance] . However, it always returns NO for me, whatever selector I specify: // Should show NOPE in iOS 5, YEP in iOS 6. Shows NOPE always NSLog(@"%@", [[UIBarButtonItem appearance] respondsToSelector:@selector(setBackgroundImage:forState:style:barMetrics:)] ? @"YEP" : @"NOPE"); // Should show YEP in both iOS 5 and iOS 6. Shows NOPE always NSLog(@"%@", [[UIBarButtonItem appearance] respondsToSelector:@selector(setBackgroundImage:forState:barMetrics:)] ? @"YEP" : @"NOPE");