Skip to content

Commit

Permalink
Managing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
prakharbhardwaj authored Dec 6, 2019
1 parent b3f9856 commit 1e5c863
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions JSONCodables/PetitionTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ class PetitionTableViewController: UITableViewController {
let nib = UINib(nibName: "PetitionTableViewCell", bundle: nil)
tableView.register(nib, forCellReuseIdentifier: "PetitionTableViewCell")
}
func requestToJson() {

func requestToJson() {
let urlString = "https://api.whitehouse.gov/v1/petitions.json?limit=100"

if let url = URL(string: urlString) {
if let data = try? Data(contentsOf: url) {
parse(json: data)
Expand Down Expand Up @@ -64,7 +63,6 @@ class PetitionTableViewController: UITableViewController {
}

override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {

return UITableView.automaticDimension
}

Expand Down

0 comments on commit 1e5c863

Please sign in to comment.