1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import Foundation import UIKit extension UIColor { static let AppDustyOrange:UIColor = UIColor(named: "AppDustyOrange")! static let AppDenimBlue:UIColor = UIColor(named: "AppDenimBlue")! static let AppBrownishGrey:UIColor = UIColor(named: "AppBrownishGrey")! } extension NSNotification.Name { static let UpdateUserProfile:NSNotification.Name = NSNotification.Name.init("UpdateUserProfile") static let UpdatePost:NSNotification.Name = NSNotification.Name.init("UpdatePost") static let UpdateCommentCount:NSNotification.Name = NSNotification.Name.init("UpdateCommentCount") static let RecevedPushNotification:NSNotification.Name = NSNotification.Name.init("RecevedPushNotification") } extension UIFont { static func appFont(size: CGFloat, weight: UIFont.Weight = .regular) -> UIFont { switch weight { case UIFont.Weight.bold: return UIFont(name: "Roboto-Bold", size: size) ?? UIFont.systemFont(ofSize: size, weight: weight) case UIFont.Weight.light: return UIFont(name: "Roboto-Light", size: size) ?? UIFont.systemFont(ofSize: size, weight: weight) case UIFont.Weight.regular: return UIFont(name: "Roboto", size: size) ?? UIFont.systemFont(ofSize: size, weight: weight) default: return UIFont(name: "Roboto", size: size) ?? UIFont.systemFont(ofSize: size, weight: weight) } } } |