Skip to content

Instantly share code, notes, and snippets.

@sxua
Created September 18, 2013 17:19
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sxua/6612459 to your computer and use it in GitHub Desktop.
Save sxua/6612459 to your computer and use it in GitHub Desktop.
UIAppearance methods (including iOS 7)

UIActivityIndicatorView

5.0

@property (readwrite, nonatomic, retain) UIColor *color

UIBarButtonItem

5.0

- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
- (void)setBackgroundVerticalPositionAdjustment:(CGFloat)adjustment forBarMetrics:(UIBarMetrics)barMetrics
- (CGFloat)backgroundVerticalPositionAdjustmentForBarMetrics:(UIBarMetrics)barMetrics
- (void)setTitlePositionAdjustment:(UIOffset)adjustment forBarMetrics:(UIBarMetrics)barMetrics
- (UIOffset)titlePositionAdjustmentForBarMetrics:(UIBarMetrics)barMetrics
- (void)setBackButtonBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backButtonBackgroundImageForState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
- (void)setBackButtonTitlePositionAdjustment:(UIOffset)adjustment forBarMetrics:(UIBarMetrics)barMetrics
- (UIOffset)backButtonTitlePositionAdjustmentForBarMetrics:(UIBarMetrics)barMetrics
- (void)setBackButtonBackgroundVerticalPositionAdjustment:(CGFloat)adjustment forBarMetrics:(UIBarMetrics)barMetrics
- (CGFloat)backButtonBackgroundVerticalPositionAdjustmentForBarMetrics:(UIBarMetrics)barMetrics

6.0

- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state style:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForState:(UIControlState)state style:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetrics

UIBarItem

5.0

- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state
- (NSDictionary *)titleTextAttributesForState:(UIControlState)state

UIButton

5.0

@property (nonatomic) UIEdgeInsets contentEdgeInsets

- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state
- (void)setTitleShadowColor:(UIColor *)color forState:(UIControlState)state
- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state

UINavigationBar

5.0

@property (nonatomic, copy) NSDictionary *titleTextAttributes

- (void)setBackgroundImage:(UIImage *)backgroundImage forBarMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForBarMetrics:(UIBarMetrics)barMetrics
- (void)setTitleVerticalPositionAdjustment:(CGFloat)adjustment forBarMetrics:(UIBarMetrics)barMetrics
- (CGFloat)titleVerticalPositionAdjustmentForBarMetrics:(UIBarMetrics)barMetrics

6.0

@property (nonatomic, retain) UIImage *shadowImage

7.0

@property (nonatomic, retain) UIColor *barTintColor
@property (nonatomic, retain) UIImage *backIndicatorImage
@property (nonatomic, retain) UIImage *backIndicatorTransitionMaskImage

- (void)setBackgroundImage:(UIImage *)backgroundImage forBarPosition:(UIBarPosition)barPosition barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForBarPosition:(UIBarPosition)barPosition barMetrics:(UIBarMetrics)barMetrics

UIPageControl

6.0

@property (nonatomic, retain) UIColor *pageIndicatorTintColor
@property (nonatomic, retain) UIColor *currentPageIndicatorTintColor

UIProgressView

5.0

@property (nonatomic, retain) UIColor* progressTintColor    
@property (nonatomic, retain) UIColor* trackTintColor    
@property (nonatomic, retain) UIImage* progressImage
@property (nonatomic, retain) UIImage* trackImage

UIRefreshControl

5.0

@property (nonatomic, retain) NSAttributedString *attributedTitle

UISearchBar

5.0

@property (nonatomic, retain) UIImage *backgroundImage
@property (nonatomic, retain) UIImage *scopeBarBackgroundImage
@property(nonatomic) UIOffset searchFieldBackgroundPositionAdjustment
@property(nonatomic) UIOffset searchTextPositionAdjustment

- (void)setSearchFieldBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state
- (UIImage *)searchFieldBackgroundImageForState:(UIControlState)state
- (void)setImage:(UIImage *)iconImage forSearchBarIcon:(UISearchBarIcon)icon state:(UIControlState)state
- (UIImage *)imageForSearchBarIcon:(UISearchBarIcon)icon state:(UIControlState)state
- (void)setScopeBarButtonBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state
- (UIImage *)scopeBarButtonBackgroundImageForState:(UIControlState)state
- (void)setScopeBarButtonDividerImage:(UIImage *)dividerImage forLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState
- (UIImage *)scopeBarButtonDividerImageForLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState
- (void)setScopeBarButtonTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state
- (NSDictionary *)scopeBarButtonTitleTextAttributesForState:(UIControlState)state
- (void)setPositionAdjustment:(UIOffset)adjustment forSearchBarIcon:(UISearchBarIcon)icon
- (UIOffset)positionAdjustmentForSearchBarIcon:(UISearchBarIcon)icon

7.0

@property(nonatomic,retain) UIColor *barTintColor

- (void)setBackgroundImage:(UIImage *)backgroundImage forBarPosition:(UIBarPosition)barPosition barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForBarPosition:(UIBarPosition)barPosition barMetrics:(UIBarMetrics)barMetrics

UISegmentedControl

5.0

- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics
- (void)setDividerImage:(UIImage *)dividerImage forLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)dividerImageForLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState barMetrics:(UIBarMetrics)barMetrics 
- (void)setTitleTextAttributes:(NSDictionary *)attributes forState:(UIControlState)state
- (NSDictionary *)titleTextAttributesForState:(UIControlState)state
- (void)setContentPositionAdjustment:(UIOffset)adjustment forSegmentType:(UISegmentedControlSegment)leftCenterRightOrAlone barMetrics:(UIBarMetrics)barMetrics
- (UIOffset)contentPositionAdjustmentForSegmentType:(UISegmentedControlSegment)leftCenterRightOrAlone barMetrics:(UIBarMetrics)barMetrics

UISlider

5.0

@property (nonatomic, retain) UIColor *minimumTrackTintColor
@property (nonatomic, retain) UIColor *maximumTrackTintColor
@property (nonatomic, retain) UIColor *thumbTintColor

UIStepper

6.0

- (void)setBackgroundImage:(UIImage*)image forState:(UIControlState)state
- (UIImage*)backgroundImageForState:(UIControlState)state
- (void)setDividerImage:(UIImage*)image forLeftSegmentState:(UIControlState)leftState rightSegmentState:(UIControlState)rightState
- (UIImage*)dividerImageForLeftSegmentState:(UIControlState)state rightSegmentState:(UIControlState)state
- (void)setIncrementImage:(UIImage *)image forState:(UIControlState)state
- (UIImage *)incrementImageForState:(UIControlState)state
- (void)setDecrementImage:(UIImage *)image forState:(UIControlState)state
- (UIImage *)decrementImageForState:(UIControlState)state

UISwitch

5.0

@property (nonatomic, retain) UIColor *onTintColor

6.0

@property (nonatomic, retain) UIColor *thumbTintColor
@property (nonatomic, retain) UIImage *onImage
@property (nonatomic, retain) UIImage *offImage

UITabBar

5.0

@property (nonatomic, retain) UIColor *selectedImageTintColor
@property (nonatomic, retain) UIImage *backgroundImage
@property (nonatomic, retain) UIImage *selectionIndicatorImage

6.0

@property (nonatomic, retain) UIImage *shadowImage

7.0

@property (nonatomic, retain) UIColor *barTintColor
@property (nonatomic) UITabBarItemPositioning itemPositioning
@property (nonatomic) CGFloat itemWidth
@property (nonatomic) CGFloat itemSpacing
@property (nonatomic) UIBarStyle barStyle

UITabBarItem

5.0

- (void)setTitlePositionAdjustment:(UIOffset)adjustment
- (UIOffset)titlePositionAdjustment

UITableView

6.0

@property (nonatomic, retain) UIColor *sectionIndexColor
@property (nonatomic, retain) UIColor *sectionIndexTrackingBackgroundColor

7.0

@property (nonatomic) UIEdgeInsets separatorInset
@property (nonatomic, retain) UIColor *sectionIndexBackgroundColor

UITableViewCell

7.0

@property (nonatomic) UIEdgeInsets separatorInset

UIToolbar

5.0

- (void)setBackgroundImage:(UIImage *)backgroundImage forToolbarPosition:(UIBarPosition)topOrBottom barMetrics:(UIBarMetrics)barMetrics
- (UIImage *)backgroundImageForToolbarPosition:(UIBarPosition)topOrBottom barMetrics:(UIBarMetrics)barMetrics

6.0

- (void)setShadowImage:(UIImage *)shadowImage forToolbarPosition:(UIBarPosition)topOrBottom
- (UIImage *)shadowImageForToolbarPosition:(UIBarPosition)topOrBottom

7.0

@property (nonatomic, retain) UIColor *barTintColor

UIView

5.0

@property (nonatomic, copy) UIColor *backgroundColor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment