uiappearance

Appearance proxy affected by upgrade to iOS 6

心已入冬 提交于 2019-12-24 01:19:36
问题 My app implements a custom segmented control background image using: // customise the segmented controls UIImage *segmentSelected = [[UIImage imageNamed:@"segcontrol_sel.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)]; UIImage *segmentUnselected = [[UIImage imageNamed:@"segcontrol_uns.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)]; UIImage *segmentSelectedUnselected = [UIImage imageNamed:@"segcontrol_sel-uns.png"]; UIImage *segUnselectedSelected = [UIImage

Set UITableView BackgroundColor Universally with UIAppearance

穿精又带淫゛_ 提交于 2019-12-24 00:53:50
问题 I'm trying to universally change the background color for my table views. It is a combination UINavigationController and TabBarController app. I've tried putting the following in AppDelegate applicationDidFinishLaunchingWithOptions [[[UITableView appearance] backgroundView] setBackgroundColor:[UIColor redColor]]; [[UITableView appearance] setBackgroundColor:[UIColor redColor]]; [[UITableView appearanceWhenContainedIn:[UINavigationController class], nil] setBackgroundColor:[UIColor greenColor]

How to change color of UISegmentedControl border in iOS7?

核能气质少年 提交于 2019-12-23 06:47:15
问题 How do I change the border color of the segmented controller in iOS7 without changing the text color? It would be ideal if I could keep the line between the segments as is (i.e. same color as the text), but if a border color change implies a change of this line it would also be ok. Note also that the text (and the lines between segments) have the color which is set with [segmCtrl setTintColor:choosenTintColor] 回答1: The linked answer does indeed answer your question, but you have to read

iOS5 UINavigationBar background image issues when prompt is shown

徘徊边缘 提交于 2019-12-22 09:38:42
问题 I am using the new appearance proxy in iOS 5 to style my UINavigationBar with a background image. [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationBG.png"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationLandscapeBG.png"] forBarMetrics:UIBarMetricsLandscapePhone]; This works fine, but I need to set the prompt property of the nav bar. When I do that, the height of the nav bar increases, and

Updating navigation bar after a change using UIAppearance

和自甴很熟 提交于 2019-12-22 04:45:15
问题 I'm currently customising the navigation bar background image of my iOS app using the UIAppearance proxy. There is a button for switching between two different modes which triggers a notification. This notification will change the background to a different image using again the proxy. My problem is that this change becomes visible only when I go to a different controller and I come back to it. I'm not able to force the update of the navigation bar within the controller. I've tried this in my

MFMessageComposeViewController appearance iOS 7

柔情痞子 提交于 2019-12-22 04:00:56
问题 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 appearanceWhenContainedIn: [[UINavigationBar appearanceWhenContainedIn:[INFSearchViewController class], nil] setBarTintColor:[UIColor colorWithWhite:0.80 alpha:1]]; This works fine. However when I present an MFMessageComposeViewController it adheres to the

UIAppearance's “when not contained in”

心不动则不痛 提交于 2019-12-22 02:56:18
问题 I am currently spinning a complex web of UIAppearance modifiers*, and have come across a problem. My usage of FlatUIKit's custom UIBarButton appearance protocol is causing MFMailComposerViewController to complain and stop working. Therefore, instead of using UIAppearance 's whenContainedIn method to specify classes that cause modification to occur, is there a way to exclude certain classes, i.e. a "when not contained in"? * I am talking about the UIAppearance protocol that is used to

iOS 7 UINavigationBar appearance not working first time…

你离开我真会死。 提交于 2019-12-21 03:28:30
问题 I am trying to change the look of the UINavigationBar in my iOS7 app. I am doing the following: - (void)viewDidLoad { [super viewDidLoad]; m_sNumberToCall = @""; UIBarButtonItem * btn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"IconHome.png"] style:UIBarButtonItemStyleBordered target:self action:@selector(btHomeTouched:)]; self.navigationItem.leftBarButtonItem = btn; self.navigationController.navigationBar.translucent = YES; [[UINavigationBar appearance] setBackgroundImage:

UIAppearance not taking effect on UILabels created programmatically

谁说胖子不能爱 提交于 2019-12-20 17:35:31
问题 We have extended UILabel to be able to apply standard fonts and colors for all uses of a given label type in our apps. Eg. @interface UILabelHeadingBold : UILabel @end In our AppDelegate, we apply fonts and colors like this [[UILabelHeadingBold appearance] setTextColor:<some color>]; [[UILabelHeadingBold appearance] setFont:<some font>]; When adding a UILabel in our XIB's, we can now select the class to be of type UILabelHeadingBold, and it works as expected. The label is shown with the

iOS 6 appearance when contained in multiple classes

久未见 提交于 2019-12-20 10:28:09
问题 I’m using the appearanceWhenContainedIn method on certain UI elements that I want to customise in my iOS 6 app. The problem I found is that none of my customisations are applied if I try to provide more than one container class, like so: // Works neither for toolbar nor navbar items [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], [UIToolbar class], nil] // Works fine (but only for navbar items, obviously) [UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class],