Skip to content

Instantly share code, notes, and snippets.

@koromiko
Created October 5, 2017 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koromiko/f905fd49023907440d2da12753063521 to your computer and use it in GitHub Desktop.
Save koromiko/f905fd49023907440d2da12753063521 to your computer and use it in GitHub Desktop.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// ....................
let photo = self.photos[indexPath.row]
//Wrap the date
let dateFormateer = DateFormatter()
dateFormateer.dateFormat = "yyyy-MM-dd"
cell.dateLabel.text = dateFormateer.string(from: photo.created_at)
//.....................
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.photos.count
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment