Questions tagged [uiappearance]

iOS 5+ API for appearance customisation. You use the UIAppearance protocol to get the appearance proxy for a class. You customize the appearance of instances of a class by sending appearance modification messages to the class’s appearance proxy.

UIAppearance allows the appearance of views and controls to be consistently defined across the entire application.

UIAppearance is a protocol that returns a proxy that will forward any configuration to instances of a particular class.

API introduced in iOS 5 allowing convenient customisation of appearance properties for all instances of class by sending appearance specification messages to the class' appearance proxy..

Note: iOS applies appearance changes when a view enters a window, it doesn’t change the appearance of a view that’s already in a window. To change the appearance of a view that’s currently in a window, remove the view from the view hierarchy and then put it back.

448 questions
11
votes
1 answer

Text color in UIMenuController affected by UIButton appearance setting

I've observed following: By setting the Titlecolor of a UIButton with appearance, the UIMenuItems in a UIMenuController of a UITextView are getting the same color. Code in applicationDidFinishLaunching: [[UIButton appearance] setTitleColor:[UIColor…
yinkou
  • 5,756
  • 2
  • 24
  • 40
11
votes
1 answer

MFMessageComposeViewController and UIAppearance, apple says don't customize

Question In the docs for MFMessageComposeViewController apple says: Important The message composition interface itself is not customizable and must not be modified by your application. But navigationbar and barbuttonitems in the…
overeasy
  • 404
  • 5
  • 12
10
votes
10 answers

UINavigationBar Appearance on Modal Not Setting

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]…
Nick
  • 517
  • 1
  • 6
  • 24
10
votes
3 answers

MFMailComposeViewController Crashes because of Global Appearance Properties on iOS6

I am getting the following crash when I present a MFMailComposeViewController: 2013-11-08 11:04:05.963 [7108:1603] *** Assertion failure in NSDictionary *_UIRecordArgumentOfInvocationAtIndex(NSInvocation *, NSUInteger, BOOL)(),…
10
votes
1 answer

setSelectedImageTintColor not working in iOS 7

I'm trying to setSelectedImageTintColor in iOS 7, but it's not working. Here's the code that I have in my AppDelegate.m under didFinishLaunchingWithOptions UITabBarController *tabBarController = (UITabBarController *)…
Cody Winton
  • 2,989
  • 5
  • 25
  • 48
10
votes
1 answer

Can you use UIAppearance to set the titleview of UINavigationItem?

I currently use this code to set the titleView of my navigation item: - (void)viewDidLoad { ... UIImage *navbarTitle = [UIImage imageNamed:@"navbartitleview1"]; UIImageView *imageView = [[UIImageView alloc]initWithImage:navbarTitle]; …
djblue2009
  • 1,342
  • 1
  • 17
  • 23
10
votes
5 answers

When can I start using properties set using UIAppearance?

I have some custom appearance properties in my view class (a descendant of UIView). I want to customize the view appearance according to these properties, but I can’t do that inside the initializer, since the values set using [[MyClass appearance]…
zoul
  • 102,279
  • 44
  • 260
  • 354
9
votes
1 answer

Different appearances in different UINavigationControllers

In iOS 11 I'm currently changing the back button for my navigation controllers like this: UINavigationBar.appearance().backIndicatorImage =…
9
votes
2 answers

How to change color of MFMailComposeViewController texts and button images?

iOS uses standard (blue) tint color for all colored texts in MFMailComposeViewController. This is not good for me, as customer wants his company colors in app. How to change their color to orange? I am asking specifically about colors of button…
9
votes
2 answers

How do a set an opaque 1px high shadow image for a UINavigationBar?

In my application delegate's didFinishLaunchingWithOptions function, I try to customize the appearance of my navigation bar. [UINavigationBar appearance].translucent = NO; [[UINavigationBar appearance] setBackgroundImage:[UIImage …
Pwner
  • 3,714
  • 6
  • 41
  • 67
9
votes
3 answers

Tracking a UIBarButtonItem selected state?

Is there a way to highlight (i.e., toggle) a UIBarButtonItem without using a custom view? For example, see 3D button from the Maps app: or Shuffle All from the Music app:
romaonthego
  • 810
  • 1
  • 8
  • 16
9
votes
5 answers

UIBarButtonItem appearance trouble in iOS 7, could this be an Apple bug?

I saw an article a while back, which is here: User Interface Customization in iOS 6 It shows customization for iOS 6. Since the article I have written Apps that use the technique, it is pretty straightforward, no magic in there. However, I need to…
LilMoke
  • 3,176
  • 7
  • 48
  • 88
9
votes
2 answers

MFMessageComposeViewController appearance iOS 7

I have an appearance proxy that sets the barTintColor property to green on UINavigationBar [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:54./255 green:165./255 blue:53./255 alpha:1]]; As needed I override this using…
Chris Wagner
  • 20,773
  • 8
  • 74
  • 95
9
votes
1 answer

How to set appearance for a UIButton without affecting UIBarButtonItems?

Using the following code to customize regular UIButtons also affects UIBarButtonItems and clear buttons in text fields. [[UIButton appearance] setBackgroundImage:greenButtonImage forState:UIControlStateNormal]; I do not wish to customize the latter…
Maciej Swic
  • 11,139
  • 8
  • 52
  • 68
9
votes
1 answer

How to get rid of UIAppearance when not needed?

In my AppDelegate I use UIAppearance to set my own NavigationBar with this code : [[UINavigationBar appearance] setTintColor:[UIColor blackColor]]; [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav5.png"]…
Rob
  • 15,732
  • 22
  • 69
  • 107
1 2
3
29 30