KDEDateLabel
  • November 24, 2023

KDEDateLabel is an UILabel subclass that saves you from refreshing it when using ‘time ago’ format.

Installation


You have multiple choices here:

  • Copy KDEDateLabel.swift in your project.
  • Adding it in your Podfile pod 'KDEDateLabel'

Usage


 

let label = KDEDateLabel(frame: CGRect(x: 0, y: 0, width: 100, height: 20))
label.date = NSDate()
label.dateFormatTextBlock = { date in
return “\(Int(fabs(date.timeIntervalSinceNow)))s ago”
}

KDEDateLabel is also compatible with Storyboard/XIB.

GitHub


View Github

#ios #kdedatelabel #storyboard #swift #uilabel
YOU MIGHT ALSO LIKE...
CameraBackground

Features Both front and back camera supported. Flash modes: auto, on, off. Countdown timer. Tap to focus. Pinch to zoom. Usage  

DKCamera

Description A light weight & simple & easy camera for iOS by Swift. It uses CoreMotion framework to detect device orientation, so ...

HorizonSDK-iOS

Horizon SDK is a state of the art real-time video recording / photo shooting iOS library. Some of the features ...

LLSimpleCamera

LLSimpleCamera: A simple customizable camera - video recorder control LLSimpleCamera is a library for creating a customized camera - video ...

RSBarcodes_Swift

RSBarcodes allows you to read 1D and 2D barcodes using the metadata scanning capabilities introduced with iOS 7 and generate ...