uiappearance

How to set UITabBarItem's unselected tint, ***including system items*** (iOS7)

我的未来我决定 提交于 2019-11-28 20:29:28
( NOTE: I see there are several similar questions on SO, but none of them seem to get at my specific issue of wanting to change the unselected appearance of both custom and system UITabBarItems.) I'm working in iOS7. I have a UITabBar with some buttons. Some of them are my buttons, some are system buttons. Example: UITabBarItem *searchButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemSearch tag: navSearchItem]; UITabBarItem *bookMkButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemBookmarks tag: navBookmarksItem]; UITabBarItem *homeButton = [

Customize text color of UIDatePicker for iOS7 (just like Mailbox does)

会有一股神秘感。 提交于 2019-11-28 16:22:22
I'm having the most frustrating dilemma. I've researched up and down and can clearly see that Apple does not want us tampering with iOS 7. Well, I want to tamper. And, the team at Mailbox clearly figured out how to do it and get approved. The main thing that I'm trying to achieve is to change the label color to white. My first thought was they are using a custom UIPickerView that just mimics a UIDatePicker, but I just don't think this is the case. I zoomed in on a small fragment and discovered remnants of a normal UIDatePicker (black lines) along with clipping on the letter "W". Now I've

Customizing Left & Right UISegmentedControl Buttons

我是研究僧i 提交于 2019-11-28 15:11:01
I'm trying to customize the following segmented control, using a left image for the first button and a right image for the second button. How would I do this using UIAppearance? I want to change the following segmentedControl: to something similar like below: The reason I want to use a custom image is so that I can change the corners of the buttons. If you look at the blue segmented control, it's more squared (my image has it's own corners). I was thinking of something like this but no use: UIImage *leftImage = [[UIImage imageNamed:@"leftControl.png"] resizableImageWithCapInsets

titleTextAttributes UIAppearance font in iOS 7

北慕城南 提交于 2019-11-28 05:47:49
I am using UIAppearance to apply fonts to UINavigationBar and UIBarButtonItem and I am having problems. I ran this code: [[UIBarButtonItem appearanceWhenContainedIn:[UIToolbar class], nil] setTitleTextAttributes: @{NSFontAttributeName : [UIFont fontWithName:@"My_Font" size:17.0]} forState:UIControlStateNormal]; NSLog(@"%@", [[UIBarButtonItem appearanceWhenContainedIn: [UIToolbar class], nil] titleTextAttributesForState:UIControlStateNormal]); and the result of that log on iOS 7 is: (null) Where the result in iOS 6 is: { NSFont = "<UICFFont: 0x1d897a80> font-family: \"My_Font\"; font-weight:

How to set font & color of the title in UINavigationBar using iOS5 appearance API?

﹥>﹥吖頭↗ 提交于 2019-11-27 17:25:31
I have a multiple View Controllers and I want to set the font color of all to red. [[UINavigationBar appearance] setFont:[UIFont boldSystemFontOfSize:12.0]]; is throwing an unrecognized selector error. How can I fix this? TigerCoding From Ray Wenderlich: http://www.raywenderlich.com/4344/user-interface-customization-in-ios-5 // Customize the title text for *all* UINavigationBars [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0], UITextAttributeTextColor, [UIColor

MFMailComposeViewController Crashes because of Global Appearance Properties on iOS6

我们两清 提交于 2019-11-27 14:46:55
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 tracked it down to the following appearance setting in my AppDelegate's application

How to set UITabBarItem's unselected tint, ***including system items*** (iOS7)

半世苍凉 提交于 2019-11-27 13:10:06
问题 ( NOTE: I see there are several similar questions on SO, but none of them seem to get at my specific issue of wanting to change the unselected appearance of both custom and system UITabBarItems.) I'm working in iOS7. I have a UITabBar with some buttons. Some of them are my buttons, some are system buttons. Example: UITabBarItem *searchButton = [[UITabBarItem alloc] initWithTabBarSystemItem: UITabBarSystemItemSearch tag: navSearchItem]; UITabBarItem *bookMkButton = [[UITabBarItem alloc]

Customize text color of UIDatePicker for iOS7 (just like Mailbox does)

荒凉一梦 提交于 2019-11-27 09:41:12
问题 I'm having the most frustrating dilemma. I've researched up and down and can clearly see that Apple does not want us tampering with iOS 7. Well, I want to tamper. And, the team at Mailbox clearly figured out how to do it and get approved. The main thing that I'm trying to achieve is to change the label color to white. My first thought was they are using a custom UIPickerView that just mimics a UIDatePicker, but I just don't think this is the case. I zoomed in on a small fragment and

Customizing Left & Right UISegmentedControl Buttons

筅森魡賤 提交于 2019-11-27 09:02:48
问题 I'm trying to customize the following segmented control, using a left image for the first button and a right image for the second button. How would I do this using UIAppearance? I want to change the following segmentedControl: to something similar like below: The reason I want to use a custom image is so that I can change the corners of the buttons. If you look at the blue segmented control, it's more squared (my image has it's own corners). I was thinking of something like this but no use:

How to default UILabel Font and Size using Swift

爷,独闯天下 提交于 2019-11-27 03:27:16
问题 I find UISegmentedControl change font and size like this : UISegmentedControl.appearance().setTitleTextAttributes(myFontAttribute as [NSObject : AnyObject] , forState: .Normal) but UILabel have no this method I want to do like UILabel.appearance().setAttributed(myFontAttribute) I don't want to change UILabel font in StoryBoard I want to using program to do this (because my app is done, but only font should change to bigger and other font) What should I do ? 回答1: First you need to add