Hello,     Is it possible to create a variable modified by the program in swift 4? example:   var number = 0 var example ( number) = “foo” if number == 0 {     example ( number) = “titi”     number = 1 }…

Hi All,   I am having trouble decoding JSON into any of these structures. Am I missing something?   The JSON format I am currently using to test looks like the following …   {      “center”: {          “x”: 129,          “y”: 94     …

Hi,   I have a little bit trouble understanding some of the parameters change in functions in Swift.   Some time ago, I wrote a wrapper for Measurement, that helps localize/intertionalize Measurements and handles normalization of some data to our server, available at github.com/Einharch/UnitLocalization  …

Hi,   I’m trying to understand how copy-on-write works in a multithreaded environment, but there are a few things that confuse me.   From the documentation, it is said that: “If the instance passed as object is being accessed by multiple threads simultaneously, isKnownUniquelyReferenced(_:) may…

I am continuing to work on Project 4 in App Developement with Swift.  I have changed the code some to use in a project I am working on.  This is the code I am using in my detail view controller.  I’m still unclear why I…

I have a UITableViewCell that has a UILabel registered and connected through storyboard.   In the custom class for this UITableViewCell, I’ve added   required init?(coder aDecoder: NSCoder) {         super.init(coder: aDecoder)               //labelName.translatesAutoresizingMaskIntoConstraints = false         //labelName.addConstraint(widthConstraint)     }   I can’t run…

Hej,   I have this functions made:   func checkUser() ->Int {         let myContainer = CKContainer.default()         let privateDatabase = myContainer.privateCloudDatabase         let publicDatabase = myContainer.publicCloudDatabase         let recordID = CKRecordID(recordName: “admin”)         /         myContainer.publicCloudDatabase.fetch(withRecordID: recordID) { (record, error) in             if let…