Latest 1.2
Homepage https://github.com/devcarlos/ClockLabel
License MIT
Platforms ios 8.0, requires ARC
Authors

ClockLabel Badge w/ Version Platform Carthage compatible Build Status license MIT

Custom Clock Fonts based Label with Glow Effect

Features

Usage

import ClockLabel

let clock1 = ClockLabel()
let clock2 = ClockLabel()
let clock3 = ClockLabel()

self.clock1.customize { label in
    label.backgroundColor = UIColor.blackColor()
    label.textAlignment = NSTextAlignment.Center
    label.textColor = UIColor(red: 0.2, green: 0.7, blue: 1.0, alpha: 1.0)
    label.fontHandler = ClockFontHandler(name: .Digital7, size: 150)
    label.glowColor = label.textColor
    label.glowOffset = CGSize(width: 2.0, height: 2.0)
    label.glowAmount = 15.0
    label.text = "8:00"
}

self.clock2.customize { label in
    label.backgroundColor = UIColor.blackColor()
    label.textAlignment = NSTextAlignment.Center
    label.textColor = UIColor.yellowColor()
    label.fontHandler = ClockFontHandler(name: .DigitalDismay, size: 150)
    label.glowColor = label.textColor
    label.glowOffset = CGSize(width: 3.0, height: 0.0)
    label.glowAmount = 20.0
    label.text = "9:00"
}

self.clock3.customize { label in
    label.backgroundColor = UIColor.blackColor()
    label.textAlignment = NSTextAlignment.Center
    label.textColor = UIColor.greenColor()
    label.fontHandler = ClockFontHandler(name: .AdvancedPixelLCD7, size: 50)
    label.glowColor = label.textColor
    label.glowOffset = CGSize(width: 2.0, height: 2.0)
    label.glowAmount = 20.0
    label.text = "10:00"
}

self.clock1.frame = CGRect(x: 50, y: 40, width: view.frame.width - 100, height: 200)
self.view.addSubview(clock1)

self.clock2.frame = CGRect(x: 50, y: 260, width: view.frame.width - 100, height: 200)
self.view.addSubview(clock2)

self.clock3.frame = CGRect(x: 50, y: 480, width: view.frame.width - 100, height: 200)
self.view.addSubview(clock3)

Install (iOS 8+)

Carthage

Add the following to your Cartfile and follow these instructions

github "devcarlos/ClockLabel"

CocoaPods

To integrate ClockLabel into your project add the following to your Podfile:

platform :ios, '8.0'
use_frameworks!

pod 'ClockLabel'

License

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

Latest podspec

{
    "name": "ClockLabel",
    "version": "1.2",
    "summary": "Custom Clock Fonts based Label with Glow Effect",
    "homepage": "https://github.com/devcarlos/ClockLabel",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Carlos Alcala": "[email protected]"
    },
    "social_media_url": "http://twitter.com/carlosalcala",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/devcarlos/ClockLabel.git",
        "tag": "1.2"
    },
    "source_files": "ClockLabel/*.swift",
    "requires_arc": true,
    "resources": "ClockLabel/ClockBundle.bundle"
}

Pin It on Pinterest

Share This