Posts

Showing posts with the label Swift Json

call API in playground

go to file: go to new : goto playground: //: Playground - noun: a place where people can play import  XCPlayground import  UIKit XCPSetExecutionShouldContinueIndefinitely (continueIndefinitely:  true ) var  str =  "Hello, playground" func  hello() {      print ( "Hello, World" ) } hello () class  Location:  NSObject  {      var  id:  String      var  name:  String      init (id :  String , name:  String ){          self . id  = id          self . name  = name      }      } var  fetchedLocation = [ Location ]() // var myArray: NSArray! = [] var  cart: [[ String :  Any ]] = [] var  arrobj: [[ String :  Any ]] = [] func  location(){ let  par:  Strin...

Swift Basics Integration Json

Image
https://www.letsbuildthatapp.com/basic-training 1. Introduction - Swift Basics In this section, we'll first cover some of the basics of Swift starting with defining a few Custom Classes for our application. Next, we go over If Statements and For Loops to inspect the custom objects that we create. Finally, we'll take a brief look at what Optionals are and how they can be used. 11:57 Custom Classes: Book & Page Episode 1 9:37 If Statements and For Loops Episode 2 9:29 Optionals Episode 3 2. Listing out Books With all our custom models now defined, we're ready to move onto listing out our books in a UITableViewController. First, we'll need to use a UINavigationController as the root of our application so we can get a nice UINavigationBar to show at the top of our views. In addition, I'll show you how to ignore the storyboard as I believe it is easier to learn iOS programming this way. Finally, we set our list...