SHARE
TWEET

Untitled

a guest Aug 19th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Alamofire.request("https://jsonplaceholder.typicode.com/todos/1").responseJSON { response in
  2.     if let response = response.result.value {
  3.         let json = JSON(response)
  4.  
  5.         let userId = json["userId"].intValue
  6.         let id = json["userId"].intValue
  7.         let title = json["title"].stringValue
  8.         let completed = json["completed"].boolValue
  9.  
  10.         let nextHour = NextHour(userId: userId, id: id, title: title, completed: completed)
  11.  
  12.         data = [nextHour]
  13.  
  14.         collectionView.reloadData()
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top