Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Alamofire.request("https://jsonplaceholder.typicode.com/todos/1").responseJSON { response in
- if let response = response.result.value {
- let json = JSON(response)
- let userId = json["userId"].intValue
- let id = json["userId"].intValue
- let title = json["title"].stringValue
- let completed = json["completed"].boolValue
- let nextHour = NextHour(userId: userId, id: id, title: title, completed: completed)
- data = [nextHour]
- collectionView.reloadData()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement