Make UIColor Codable

If you care only about the 4 color components this is a simple solution using a wrapper struct struct Color : Codable { var red : CGFloat = 0.0, green: CGFloat = 0.0, blue: CGFloat = 0.0, alpha: CGFloat = 0.0 var uiColor : UIColor { return UIColor(red: red, green: green, blue: blue, alpha: alpha) … Read more

Swift 4 ,must be used from main thread only warning

You’re making this call on a background queue. To fix, try something like… public var context: NSManagedObjectContext DispatchQueue.main.async { var appDelegate = UIApplication.shared.delegate as! AppDelegate context = appDelegate.persistentContainer.viewContext } Although this is a pretty bad way to do this… you’re using your App Delegate as a global variable (which we all know is bad!) You should … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)