Latest 0.3.0
License MIT
Platforms ios 8.0

Build Status


Requires Swift3.


LiipKit is available through the Liip CocoaPods repo. To install
it, simply add the following lines to your Podfile:

pod "LiipKit"


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




Int extensions

Convert seconds (Int) to hours:minutes:seconds (String)

120.secondsToHoursMinutesSeconds() // => == "0:02:00"

NSDate extensions

Transform a date to a string

date.toString() // => "08-03-2016
date.toString("dd.MM.yyyy") // => "08.03.2016"
date.toString("yyyy") // => "2016"

String extensions

Prefix tilde for localized string

~"test" // => == NSLocalizedString("test", comment: "No comment")

Method which return true if a string is empty or whitespace(s)

"".isEmptyOrWhitespace() // true
"  ".isEmptyOrWhitespace() // true
"test".isEmptyOrWhitespace() // false

Convert string to DateTime object with .toDateTime


UIAlertController extensions

Method show to allow to show the alert without knowing the top view controller required to present an alert.

let alert = UIAlertController(title: "Alert", message: "Alert message", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.default, handler: nil)) true, completion: nil)

UIBarItem extensions

Provide a property localizedTitle which is available in Interface Builder (see Main.storyboard in Example project).

UIButton extensions

Provide a property localizedTitleForNormal and localizedTitleForHighlighted which are available in Interface Builder (see Main.storyboard in Example project).

UIColor extensions

Hex initializers

UIColor(hex: 0x0099FF)
UIColor(hex: 0x0099FF, alpha: 0.3)
UIColor(hexString: "0x0099FF")
UIColor(hexString: "#0099FF")
UIColor(hexString: "0x0099FF", alpha: 0.3)
UIColor(hexString: "#0099FF", alpha: 0.3)

Simplified initializers

UIColor(r: 0, g: 127.5, b: 255)
UIColor(r: 0, g: 127.5, b: 255, a: 0.5)

UILabel extensions

Provide a property localizedText which is available in Interface Builder (see Main.storyboard in Example project).


  • NoĆ© Froidevaux
  • Manuel Escrig
  • Germain Hugon


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

Latest podspec

    "name": "LiipKit",
    "version": "0.3.0",
    "summary": "LiipKit regroups usefull classes/extensions used in many applications.",
    "description": "LiipKit provides usefull extensions forn* Intn* NSDaten* Stringn* UIBarItemn* UIButtonn* UIColorn* UILabeln* ...",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Liip AG": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.3.0"
    "social_media_url": "",
    "platforms": {
        "ios": "8.0"
    "source_files": "LiipKit/Extensions/**/*",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This