Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Haidora/HaidoraThemeKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

HaidoraThemeKit

UIKit appearance 的封装。

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Objective-C
#import <HaidoraThemeKit/HaidoraThemeKit-Swift.h>
//or #import <XXX-Swift.h>
[HDThemeKit setupThemeWithPrimaryColor:[UIColor redColor] secondaryColor:[UIColor whiteColor]];
//自定义某一类
[UIXXX applyHDTheme:XXX]
Swift
HDThemeKit.setupTheme() 
//or HDThemeKit.setupTheme(primaryColor: UIColor(red:0.314, green:0.420, blue:0.471, alpha: 1), secondaryColor: UIColor.whiteColor())
//自定义某一类
UIXXX.applyHDTheme(XXX)

Installation

###CocoaPods

HaidoraThemeKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "HaidoraThemeKit"
  • iOS 8.0+

###CocoaSeeds 可以通过CocoaSeeds来安装。Seedfile如下:

github "Haidora/HaidoraThemeKit", "0.1.0", :files => "Pod/Classes/*.{swift,h}"
  • iOS 7.0+

###Manually

Download the latest tag and drag the sources into your Xcode project.

进度

UIActivityIndicatorView

  • UIActivityIndicatorView.appearance().activityIndicatorViewStyle - activityIndicatorViewStyle
  • UIActivityIndicatorView.appearance().color - activityColor

UINavigationBar

  • UINavigationBar.appearance().tintColor - navigationItemColor
  • UINavigationBar.appearance().barTintColor - navigationBackground
  • UINavigationBar.appearance().barStyle - navigationBarStyle
  • UINavigationBar.appearance().titleTextAttributes.NSForegroundColorAttributeName - navigationTitleColor
  • UINavigationBar.appearance().titleTextAttributes.NSFontAttributeName - navigationTitleFont

UIPageControl

  • UIPageControl.appearance().currentPageIndicatorTintColor - currentPageIndicatorColor
  • UIPageControl.appearance().pageIndicatorTintColor - pageIndicatorColor

UIProgressView

  • UIProgressView.appearance().progressTintColor - progressTintColor
  • UIProgressView.appearance().trackTintColor - trackColor
  • UIProgressView.appearance().progressImage - progressImage
  • UIProgressView.appearance().trackImage - trackImage
  • UIProgressView.appearance().progressViewStyle - progressViewStyle

UISegmentedControl

  • UISegmentedControl.appearance().tintColor - tintColor

UISlider

  • UISlider.appearance().minimumTrackTintColor - minimumTrackTintColor
  • UISlider.appearance().thumbTintColor - thumbTintColor
  • UISlider.appearance().maximumTrackTintColor - maximumTrackTintColor
  • UISlider.appearance().minimumValueImage - minimumValueImage
  • UISlider.appearance().maximumValueImage - maximumValueImage

UIStepper

  • UIStepper.appearance().tintColor - tintColor

UISwitch

  • UISwitch.appearance().onTintColor - turnedOnColor
  • UISwitch.appearance().thumbTintColor - thumbTintColor
  • UISwitch.appearance().onTintColor - tintColor
  • UISwitch.appearance().onImage - onImage
  • UISwitch.appearance().offImage - offImage

UITabBar

  • UITabBar.appearance().barTintColor - tabbarBackground
  • UITabBar.appearance().tintColor - barItemTintColor
  • UITabBar.appearance().barStyle - barStyle
  • UITabBar.appearance().translucent - translucent

UIToolbar

  • UIToolbar.appearance().barTintColor - toolbarBackground
  • UIToolbar.appearance().tintColor - barItemTintColor
  • UIToolbar.appearance().barStyle - barStyle
  • UIToolbar.appearance().translucent - translucent

Contact

Mrdaios

License

HaidoraThemeKit is available under the MIT license. See the LICENSE file for more info.

About

UIKit appearance的封装。fork from(https://github.com/dphans/DPTheme)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /