Skip to content

iOS UI Theme Manager in Swift/ObjC

License

Notifications You must be signed in to change notification settings

lalawue/LWTheme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

中文介绍

the ObjectiveC version please refers to ObjC branch.

Introduction

the library provide a simple interface to use theme/skin manager for iOS8+, including

  • backgroundColor
  • borderColor
  • gradientColor
  • font family and size
  • image or tint image
  • attributed string foreground/background color

also provide a simple way to add the theme/skin ability for other UI element.

ScreenShot

Light

Light

Dark

Dark

Demos

cd Example
pod install
open Example.xcworkspace

then click 'change theme'.

ThemeMap and Interface

change theme with

LWThemeManager.sharedInstance.useThemeMode(_ mode : LWThemeMode, themeMap : NSDictionary)

theme map is a dictionary, defined with color key, font family name and size (conjunction with ':'), image name for different mode.

you can defined yours theme map as below:

LightMap

DarkMap