Skip to content

Commit

Permalink
Example use URL for data binding
Browse files Browse the repository at this point in the history
  • Loading branch information
noblakit01 committed Aug 3, 2017
1 parent 1e125f0 commit bdd5620
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PhotoCollectionViewDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ extension ViewController: PhotoCollectionViewDataSource {
func photoColletionView(_ photoCollectionView: PhotoCollectionView, imageAt index: Int) -> UIImage? {
return UIImage(named: "image\(index + 1)")
}

/* can use URL for data
func photoCollectionView(_ photoCollectionView: PhotoCollectionView, urlImageAt index: Int) -> URL? {
return URL(string: "https://i.ytimg.com/vi/SfLV8hD7zX4/maxresdefault.jpg")
}*/
}

extension ViewController: PhotoCollectionViewDelegate {
Expand Down

0 comments on commit bdd5620

Please sign in to comment.