AMNowClockView
AMNowClockView
is a view can display current time.
Demo
Usage
let clockView = AMNowClockView(frame: view.bounds)
// customize here
view.addSubview(clockView)
Customization
AMNowClockView
can be customized via the following properties.
@IBInspectable public var clockBorderLineWidth: CGFloat = 5.0
@IBInspectable public var smallClockIndexWidth: CGFloat = 1.0
@IBInspectable public var clockIndexWidth: CGFloat = 2.0
@IBInspectable public var hourHandWidth: CGFloat = 3.5
@IBInspectable public var minuteHandWidth: CGFloat = 3.0
@IBInspectable public var secondHandWidth: CGFloat = 1.5
@IBInspectable public var clockBorderLineColor: UIColor = .black
@IBInspectable public var hourHandColor: UIColor = .black
@IBInspectable public var minuteHandColor: UIColor = .black
@IBInspectable public var secondHandColor: UIColor = .black
@IBInspectable public var selectedTimeLabelTextColor: UIColor = .black
@IBInspectable public var timeLabelTextColor: UIColor = .black
@IBInspectable public var smallClockIndexColor: UIColor = .black
@IBInspectable public var clockIndexColor: UIColor = .black
@IBInspectable public var clockColor: UIColor = .clear
@IBInspectable public var clockImage: UIImage?
@IBInspectable public var minuteHandImage: UIImage?
@IBInspectable public var hourHandImage: UIImage?
@IBInspectable public var secondHandImage: UIImage?
@IBInspectable public var isShowSelectedTime: Bool = false
public var clockType: AMNCClockType = .arabic
/// Time zone
///
/// default is TimeZone.current
public var timeZone: TimeZone?
Set time zone(from ver.2.1)
clockView.timeZone = TimeZone(identifier: "GMT")
Installation
CocoaPods
Add this to your Podfile.
pod 'AMNowClockView'
Carthage
Add this to your Cartfile.
github "adventam10/AMNowClockView"
License
MIT