Post

Replies

Boosts

Views

Activity

Reply to Does it get any easier?
KMT & Claude31,Thanks for the advise. To be honest when I started my study this morning I was dicouraged, but I just finished the section for MVC and suprisingly things make a lot more sense now and what I have to do. I have found Swift to be a lot esier than when I was trying to learn Obj-c and the Apple App Development for Swift book seems quite good. I'm more easily now wrapping my head around dealing with Objects. Currenly I'm using the Interface Builder, as this is obviously easier for me. Thanks again. I'll end with that.
May ’20
Reply to JSON Decoder not working with Restaurant Guided App
OOPer, thank for your response. Here is the results of the print and the struct for PreparationTimeSo comparing this time with the menu data provided by the localhost server, the time of 12 is correct, telling me it is in fact accessing the property as it should.{"preparation_time": 12}struct Categories: Codable { let categories: [String] } struct PreparationTime: Codable { let prepTime: Int enum CodingKeys: String, CodingKey { case prepTime = "preparation_time" } }UPDATE: As I was typing this response and noticing by the print string you gave me showed preparation_time of 12 it gave me some insight to dig a little more. I then I spotted the mistake! Such a small stupid mistake that I can't belive I missed during debugging, as I went line by line in my code to find it.....In my CodingKeys I missed spelled "preparation", I had it as preperation! What a rookie mistake....Now all is working as expected.Thanks for the help.
Jun ’20
Reply to JSON Decoder not working with Restaurant Guided App
Hey Claude31, although it is working now, just thought I would respond to you. The orderURL was my first checked during debugging and it was providing the correct appending URL.To answer your second question, it was my understanding that I needed to use the @escaping keyword in the completion if I wanted the closure code to run complete when the function has finished.
Jun ’20