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...
exyte

     

camerakit-ios

CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service ...

HybridCamera

[video width="192" height="416" mp4="https://swiftgit.com/wp-content/uploads/2024/12/68747470733a2f2f7261776769742e636f6d2f7374796c656b69742f696d672f6d61737465722f7669645f6564697465645f325f326d622e676966.mp4"][/video]

TakeASelfie

An iOS framework that uses the front camera, detects your face and takes a selfie. This api opens the front ...

iOS-Depth-Sampler

Code examples of Depth APIs in iOS