Advertisement
IbrahimHassan

Untitled

Jun 8th, 2021
1,010
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.48 KB | None | 0 0
  1. func SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(_ v: String) -> Bool {
  2.     UIDevice.current.systemVersion.compare(v, options: .numeric, range: nil, locale: .current) != .orderedAscending
  3. }
  4.  
  5. func UIColorFromRGB(_ rgbValue: Int) -> UIColor {
  6.     UIColor(
  7.         red: CGFloat((Float((rgbValue & 0xff0000) >> 16)) / 255.0),
  8.         green: CGFloat((Float((rgbValue & 0xff00) >> 8)) / 255.0),
  9.         blue: CGFloat((Float(rgbValue & 0xff)) / 255.0),
  10.         alpha: 1.0)
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement