uiappearance

Bar Button Item Tint Color not working

谁都会走 提交于 2021-02-10 18:14:36
问题 As you can see in the attached image, the bar button has its tint color set to red, however it is displayed in black. I think this is due to the text color still being black? Is there a way to change this? I changed the tint color of this bar button item, the navigation bar it is in, and the UIBarButtonItem.appearance() , as well as UINavigationBar.appearance() . Closing the popover and reopening it changes the color. EDIT In the hierarchy below the bar button has the correct tint color (no

Wrong text color in buttons when sharing with WhatsApp via UIActivityViewController

萝らか妹 提交于 2020-08-05 18:45:50
问题 When I share an text to WhatsApp with the UIActivityViewController the second screen of the sharing, for my case, has the wrong button colors. The first screen is OK. This issue has been discussed a lot of times and one great bucket of answers can be found here: Cannot set text color of Send and Cancel buttons in the mail composer when presented from the UIActivityViewController in iOS7 The answer fixes for me the button colors of: MFMailComposeViewController And the first screen when sharing

Wrong text color in buttons when sharing with WhatsApp via UIActivityViewController

我只是一个虾纸丫 提交于 2020-08-05 18:45:10
问题 When I share an text to WhatsApp with the UIActivityViewController the second screen of the sharing, for my case, has the wrong button colors. The first screen is OK. This issue has been discussed a lot of times and one great bucket of answers can be found here: Cannot set text color of Send and Cancel buttons in the mail composer when presented from the UIActivityViewController in iOS7 The answer fixes for me the button colors of: MFMailComposeViewController And the first screen when sharing

Change UISearchBar textColor not working

旧城冷巷雨未停 提交于 2020-01-23 07:05:08
问题 I am using google places API for autoComplete widget. I am showing the full screen control in ios 9+ using swift. I am adding a full control as given in the docs. I have added the code as shown in the docs. Now I want to change the searchBar text color to whiteColor. So I tried this UITextField.appearanceWhenContainedInInstancesOfClasses([UISearchBar.self]).textColor = UIColor.whiteColor() But I am not getting the desired behaviour. Below is the screenshot This has been given in Docs https:/

Custom iOS UIDatepicker using UIAppearance

人走茶凉 提交于 2020-01-08 19:41:28
问题 UNIQLO's new alarm app has a custom UIDatePicker : And I want to create my own custom UIDatePicker . I tried to change the appearance of the DatePicker, but looking for UI_APPEARANCE_SELECTOR in the UIDatePicker returns nothing . Meaning that its not possible to change any values, as per the docs: To support appearance customization, a class must conform to the UIAppearanceContainer protocol and relevant accessor methods must be marked with UI_APPEARANCE_SELECTOR. How can change my

How do I make the color of UIBarButtonItems for MFMailComposeViewController from the default blue?

女生的网名这么多〃 提交于 2020-01-03 16:58:49
问题 No matter what I seem to try, in the email screen that comes up when a user chooses to email a link (it's a MFMailComposeViewController ) the buttons are always the default blue. I have this in my AppDelegate: [[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:0.000 green:156/255.0 blue:51/255.0 alpha:1]]; [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]]; [[UINavigationBar appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName: [UIColor

setBackgroundImage for UIBarButtonItem via appearance not working for other UIControlStates

本秂侑毒 提交于 2020-01-03 03:29:05
问题 I'm trying to customize a UIBarButtonItem using the appearance method (>iOS 5.0). It works fine for the UIControlStateNormal, but not for highlighted or disabled. See images Here's the code I use to set those: // now configure the UIBarButtonItems UIImage *buttonBGInactive = [[UIImage imageNamed:@"button-navbar-30-inactive.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)]; UIImage *buttonBGActive = [[UIImage imageNamed:@"button-navbar-30-pressed.png"]

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

人盡茶涼 提交于 2020-01-01 03:10:51
问题 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 update one of my apps and under iOS 7 it does not work correctly. It appears that customization of UIBarButtonItems does not work the first time the view is presented. If I dismiss the view and then present it agin everything works fine. What is

Customizing UIBarButtonItem “Done” style and “Plain” style separately using UIAppearance

岁酱吖の 提交于 2019-12-30 01:54:08
问题 I know how to customize UIBarButtonItem using -setBackgroundImage: forState: barMetrics: , but I would like to use different images for UIBarButtonItemStyleDone and UIBarButtonItemStylePlain . Is there a way to accomplish this using the UIAppearance protocol? Or do I have to set the image each time I want a "Done" style button? (I tried messing around with code like the following: [[UIBarButtonItem appearance] setBackgroundImage:image forState:UIControlStateNormal barMetrics

MFMailComposeViewController Crashes because of Global Appearance Properties on iOS6

只谈情不闲聊 提交于 2019-12-28 04:14:06
问题 I am getting the following crash when I present a MFMailComposeViewController : 2013-11-08 11:04:05.963 <redacted>[7108:1603] *** Assertion failure in NSDictionary *_UIRecordArgumentOfInvocationAtIndex(NSInvocation *, NSUInteger, BOOL)(), /SourceCache/UIKit/UIKit-2380.17/UIAppearance.m:1118 2013-11-08 11:04:06.032 <redacted>[7108:1603] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unknown key, "NSColor" in title text attributes dictionary' I've