Latest 0.1.9
License MIT
Platforms ios 10.0


WiCommon library is at the bottom of WI hierarchy tree. Library to setup theme (colors and font) for entire project.

It is compatible with iOS (10.0+)

Supporting WICommon

Please don’t forget to the repo. This increases its visibility and encourages others to contribute. Thanks



Just drop the WICommon folder into your project. That’s it!


CocoaPods is a dependency manager for Cocoa projects. To install WICommon library with CocoaPods:

  1. Make sure CocoaPods is installed.

  2. Update your Podfile to include the following:
pod 'wicommon'
  1. Run pod install.

  2. In your code import WICommon like so:
import wicommon

Example – theme (font and colors)

To setup while-labeled theme for the app.

WICommon.shared.theme.type = .greyscale

and for customised theme

WICommon.shared.theme.type = .custom

// Setup Customised colors for theme
WICommon.shared.theme.colors.setCustomColors(primary: <UIcolor>,
        hero: <UIColor>,
        neutral: <UIColor>,
        heading: <UIColor>,
        text: <UIColor>,
        muted: <UIColor>,
        border: <UIColor>,
        background: <Color>,
        light: <UIColor>)

WICommon.shared.theme.fonts.setCustomFonts(normal: "HelviticaNeue",
        bold: "HelviticaNeue-Bold",
        italic: "HelviticaNeue-Italic",
        semibold: "HelviticaNeue-Medium")

Example – capture theme change

To capturing theme changing notification throughout the app.

NotificationCenter.default.addObserver(self, selector: #selector(self.themeChanged(notification:)) , name: WITheme.changed, object: nil)


@objc func themeChanged(notification: Notification) {
    //write your theme change code here

and for stopping notifications

NotificationCenter.default.removeObserver(self, name: WITheme.changed, object: nil)

Want to help?

Got a bug fix, or a new feature? Create a pull request and go for it!


noumankhan71, [email protected]


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


Latest podspec

    "name": "wicommon",
    "version": "0.1.9",
    "summary": "WiCommon library is at the bottom of WI hierarchy tree. Library to setup theme (colors and font) for entire project.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "noumankhan71": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.9"
    "platforms": {
        "ios": "10.0"
    "pod_target_xcconfig": {
        "SWIFT_VERSION": "4.0"
    "source_files": "wicommon/Classes/**/*",
    "resources": "wicommon/Assets/**/*"

Pin It on Pinterest

Share This