Category "swift4"

Function opaque return type was inferred as ... which defines the opaque type in terms of itself

Xcode gives the error: Function opaque return type was inferred as 'Button', which defines the opaque type in terms of itself on the line below: @State var sh

navigation bar back ground color will change into wrong color when table view scrolls in swift 4

I seen this video on you tube https://www.youtube.com/watch?v=rNy6aQQYbuY But the problem is that navigation bar color will not change color into correct color

Refreshing auth token with Moya

I'm using Moya to communicate with my API. For many of my endpoints, I require that the user be authenticated (i.e. a bearer token is based in the Authorization

Make UIColor Codable

struct Task: Codable { var content: String var deadline: Date var color: UIColor ... } There are warnings saying "Type 'Task' does not conform to

Custom SessionManager in Alamofire 4.7 cancels immediately

Hi I'm trying to create a custom SessionManager in Alamofire in order to change the default timeoutIntervalForRequest value. I'm using the code below: let co

Implementing Codable for UIColor

Is it possible to implement the Encodable and Decodable properties for UIColor When I try to add a Decodable extension I get an error extension UIColor : Deco

Show sheet when the main window first loads

I am trying to get a sheet to load when the main window first loads. This sheet is so that it asks the user for a file so that they are sort of forced to open a

Swift - Getting only AlphaNumeric Characters from String

I'm trying to create an internal function for the String class to get only AlphaNumeric characters and return a string. I'm running into a few errors with how t

Using Decodable in Swift 4 with Inheritance

Should the use of class inheritance break the Decodability of class. For example, the following code class Server : Codable { var id : Int? } class Deve

failed: permission_denied when setValue: or removeValue: in Firebase Database | Swift 4

I have seen lots of answers in stackoverflow but none is working for me! This is my code: import UIKit import Firebase class ViewController: UIViewController

How do I refactor my code to call AppDelegate on the main thread?

I recently started migrating my project from Swift3/Xcode8 to Swift4/Xcode9. My app crashes at runtime because the main thread sanitizer allows access to UIAppl