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
0
votes
2 answers

Get frame of Navigation Bar with UINavigationBar appearance

Sorry for simple question, but following code: [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"backgroundNavigationBar.png"] forBarMetrics:UIBarMetricsDefault]; CGRect frame = [[UINavigationBar appearance]…
pmor
  • 5,392
  • 4
  • 17
  • 36
0
votes
1 answer

How to customize the calloutAccessoryView of a MKAnnotationView under iOS7?

Under iOS6 I did the following to set a custom image for the button of the right callout accessory view: UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; [rightButton setImage:[UIImage…
MMore
  • 375
  • 3
  • 12
0
votes
1 answer

How to set property of UITextField at UITextField subclass

I have this subclass of UITextField and I would like to set a property as background color, border etc of UITextField. I don't know, if I use right method, because when I use this class for a UItextField, the UITextField doesn't change.. In which…
krata
  • 101
  • 10
0
votes
1 answer

UIAppearance not updated when popping a view controller

UINavigationBar UIAppearance doesn't update when popping from a pushed view controller. But it does when dismissing from a modal view controller. Is that the normal behaviour? Is there a way to update it when only popping from a pushed view…
user3250560
  • 646
  • 2
  • 9
  • 15
0
votes
1 answer

UIAppearance subview disappears from Navigationbar

I'm doing some changes to the Navigationbar with appearance in appdelegate. This is my method: -(void) setAppearance{ NSMutableDictionary *titleBarAttributes = [NSMutableDictionary dictionaryWithDictionary: [[UINavigationBar appearance]…
Lord Vermillion
  • 5,264
  • 20
  • 69
  • 109
0
votes
1 answer

Theming my iPhone App with a new background, navigation bar image and tab bar image

I am in the process of theming my application, giving users the choice of selecting and switching between themes in the App Settings. I have a three-tabbed Tab Bar Controller. Tab 1 = Timeline; Tab 2 = Events and Tab 3 = Settings where all three…
amitsbajaj
  • 1,304
  • 1
  • 24
  • 59
0
votes
2 answers

Must switch views for "[[UINavigationBar appearance] setBarTintColor:[UIColor darkGrayColor]];" to work

I'm setting the bar tint color to be different on button click but you have to switch views for the following method to take effect. I have no clue why it is not. [[UINavigationBar appearance] setBarTintColor:[UIColor darkGrayColor]]; Thanks :D
Colton Anglin
  • 431
  • 3
  • 9
  • 19
0
votes
1 answer

How to get transparent navigation bar in root viewcontroller using UIappearance

In my app's delegate, I specify a transparent tool bar with (as suggested in an answer to question 18969248):- The code is: UINavigationBar *navigationBarAppearance = [UINavigationBar appearance]; navigationBarAppearance.backgroundColor = [UIColor…
user258279
  • 371
  • 4
  • 12
0
votes
2 answers

SKStoreProductViewController title color

How do you change the title color and/or bar tint color in a SKStoreProductViewController? I'm using the appearance API to set navigation bars to a dark color and the text to white. It changes the title color but not the bar tint color in my…
Berry Blue
  • 15,330
  • 18
  • 62
  • 113
0
votes
1 answer

Separating UIAppearence code

I want to implement add themes to an app I'm creating. Simply just switching between 2 colors and I want the navigation bars, tool bars etc. to appear in the selected color. When the app first loads, I apply one color to in the…
Isuru
  • 30,617
  • 60
  • 187
  • 303
0
votes
2 answers

Globally set background color of buttons, except accessory buttons in UITableView

I am using the below code to make all my buttons in an application the same color. However the accessory icon in the UITTableView row also has it. Is there a way to ignore it in the table view? [[UIButton appearance] setBackgroundColor:[UIColor…
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
0
votes
1 answer

UISearchBar inside a NavigationBar Get Deferenced When Keyboard Shows Up

I'm putting a search bar inside a navigation bar. here is the code self.navigationBar =[[UINavigationBar alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 64)]; [self.view addSubview:self.navigationBar]; self.doneButton =…
fengd
  • 7,551
  • 3
  • 41
  • 44
0
votes
1 answer

Default back button background image of UIBarButtonItem appears over my custom

In the AppDelegate I'm setting custom back button background image with UIAppearence. [[UIBarButtonItem appearance] setBackButtonBackgroundImage:image forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UIBarButtonItem appearance]…
user1492784
0
votes
0 answers

NavigationBar Image on iOS 6.1 too large

In my app, I have custom navigation bars using images. I load them up in viewWillAppear like so: -(void)viewWillAppear:(BOOL)animated { UIImage *gradientImage46 = [[UIImage…
user717452
  • 33
  • 14
  • 73
  • 149
0
votes
2 answers

Can't change the background for UIBarButtonItem

I need to change the default (which was already declared in my AppDelegate) background for UIBarButtonItem in one ViewController. So, In my AppDelegate I have: UIImage *navBarItemBackground = [UIImage…
ShurupuS
  • 2,923
  • 2
  • 24
  • 44