{"action":"created","comment":{"url":"https://api.github.com/repos/artsy/Emergence/pulls/comments/41779412","id":41779412,"diff_hunk":"@@ -0,0 +1,36 @@\n+import UIKit\n+\n+/// Takes a [String] as imagePaths and goes through them all\n+\n+class SlideshowView: UIView {\n+    var imagePaths: [String] = []\n+    private var index = -1\n+\n+    private var imageView: UIImageView {\n+        let imageView = UIImageView(frame: self.bounds)\n+        addSubview(imageView)\n+        imageView.contentMode = .ScaleAspectFill;\n+        imageView.image = self.imageAtIndex(0)\n+        return imageView\n+    }\n+\n+    private func imageAtIndex(index: Int) -> UIImage {","path":"Emergence/Contexts/App Setup/Auth and Slideshow/SlideshowView.swift","position":17,"original_position":17,"commit_id":"8b0c74c79ab46f9c03550f35c98d5e2125df9f5b","original_commit_id":"8b0c74c79ab46f9c03550f35c98d5e2125df9f5b","user":{"login":"ashfurrow","id":498212,"avatar_url":"https://avatars.githubusercontent.com/u/498212?v=3","gravatar_id":"","url":"https://api.github.com/users/ashfurrow","html_url":"https://github.com/ashfurrow","followers_url":"https://api.github.com/users/ashfurrow/followers","following_url":"https://api.github.com/users/ashfurrow/following{/other_user}","gists_url":"https://api.github.com/users/ashfurrow/gists{/gist_id}","starred_url":"https://api.github.com/users/ashfurrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashfurrow/subscriptions","organizations_url":"https://api.github.com/users/ashfurrow/orgs","repos_url":"https://api.github.com/users/ashfurrow/repos","events_url":"https://api.github.com/users/ashfurrow/events{/privacy}","received_events_url":"https://api.github.com/users/ashfurrow/received_events","type":"User","site_admin":false},"body":"Lots of `!` here, which kind of makes sense, but two other solutions come to mind:\r\n\r\n- Create an `enum` for accessing the images instead of using `Int`, and trust that if we change the images, we'll update the `enum`.\r\n- Have this return `UIImage?` and remove the crash operator.\r\n\r\nI like the second one personally, since it's easy, and `UIImageView`'s `image` property can take a `nil` anyway, so you shouldn't need any other code changes.","created_at":"2015-10-12T17:21:52Z","updated_at":"2015-10-12T17:21:52Z","html_url":"https://github.com/artsy/Emergence/pull/10#discussion_r41779412","pull_request_url":"https://api.github.com/repos/artsy/Emergence/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/artsy/Emergence/pulls/comments/41779412"},"html":{"href":"https://github.com/artsy/Emergence/pull/10#discussion_r41779412"},"pull_request":{"href":"https://api.github.com/repos/artsy/Emergence/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/artsy/Emergence/pulls/10","id":47401927,"html_url":"https://github.com/artsy/Emergence/pull/10","diff_url":"https://github.com/artsy/Emergence/pull/10.diff","patch_url":"https://github.com/artsy/Emergence/pull/10.patch","issue_url":"https://api.github.com/repos/artsy/Emergence/issues/10","number":10,"state":"open","locked":false,"title":"@ashfurrow => Gets the Home screen up and running","user":{"login":"orta","id":49038,"avatar_url":"https://avatars.githubusercontent.com/u/49038?v=3","gravatar_id":"","url":"https://api.github.com/users/orta","html_url":"https://github.com/orta","followers_url":"https://api.github.com/users/orta/followers","following_url":"https://api.github.com/users/orta/following{/other_user}","gists_url":"https://api.github.com/users/orta/gists{/gist_id}","starred_url":"https://api.github.com/users/orta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orta/subscriptions","organizations_url":"https://api.github.com/users/orta/orgs","repos_url":"https://api.github.com/users/orta/repos","events_url":"https://api.github.com/users/orta/events{/privacy}","received_events_url":"https://api.github.com/users/orta/received_events","type":"User","site_admin":false},"body":"![screen shot 2015-10-12 at 10 33 41](https://cloud.githubusercontent.com/assets/49038/10425127/fb7803aa-70cc-11e5-9346-e8b2fb67a0fe.png)\r\n\r\nThis adds:\r\n\r\n* A slideshow for the auth, that will skip if it has enough data to move on\r\n* A home screen with rows of shows, starting with Featured / NYC, then when you go down to NY it starts downloading the next set as you scroll\r\n* Minor revisions to the show view ","created_at":"2015-10-12T09:55:34Z","updated_at":"2015-10-12T17:21:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f88e316eb9ad143a88e5c937753e27167d2247a6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artsy/Emergence/pulls/10/commits","review_comments_url":"https://api.github.com/repos/artsy/Emergence/pulls/10/comments","review_comment_url":"https://api.github.com/repos/artsy/Emergence/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsy/Emergence/issues/10/comments","statuses_url":"https://api.github.com/repos/artsy/Emergence/statuses/8b0c74c79ab46f9c03550f35c98d5e2125df9f5b","head":{"label":"artsy:orta-a1","ref":"orta-a1","sha":"8b0c74c79ab46f9c03550f35c98d5e2125df9f5b","user":{"login":"artsy","id":546231,"avatar_url":"https://avatars.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":42919437,"name":"Emergence","full_name":"artsy/Emergence","owner":{"login":"artsy","id":546231,"avatar_url":"https://avatars.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artsy/Emergence","description":"TV, Shows","fork":false,"url":"https://api.github.com/repos/artsy/Emergence","forks_url":"https://api.github.com/repos/artsy/Emergence/forks","keys_url":"https://api.github.com/repos/artsy/Emergence/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/Emergence/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/Emergence/teams","hooks_url":"https://api.github.com/repos/artsy/Emergence/hooks","issue_events_url":"https://api.github.com/repos/artsy/Emergence/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/Emergence/events","assignees_url":"https://api.github.com/repos/artsy/Emergence/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/Emergence/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/Emergence/tags","blobs_url":"https://api.github.com/repos/artsy/Emergence/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/Emergence/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/Emergence/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/Emergence/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/Emergence/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/Emergence/languages","stargazers_url":"https://api.github.com/repos/artsy/Emergence/stargazers","contributors_url":"https://api.github.com/repos/artsy/Emergence/contributors","subscribers_url":"https://api.github.com/repos/artsy/Emergence/subscribers","subscription_url":"https://api.github.com/repos/artsy/Emergence/subscription","commits_url":"https://api.github.com/repos/artsy/Emergence/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/Emergence/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/Emergence/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/Emergence/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/Emergence/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/Emergence/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/Emergence/merges","archive_url":"https://api.github.com/repos/artsy/Emergence/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/Emergence/downloads","issues_url":"https://api.github.com/repos/artsy/Emergence/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/Emergence/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/Emergence/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/Emergence/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/Emergence/labels{/name}","releases_url":"https://api.github.com/repos/artsy/Emergence/releases{/id}","created_at":"2015-09-22T07:51:26Z","updated_at":"2015-10-12T13:39:49Z","pushed_at":"2015-10-12T16:40:58Z","git_url":"git://github.com/artsy/Emergence.git","ssh_url":"git@github.com:artsy/Emergence.git","clone_url":"https://github.com/artsy/Emergence.git","svn_url":"https://github.com/artsy/Emergence","homepage":"","size":716,"stargazers_count":26,"watchers_count":26,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":26,"default_branch":"master"}},"base":{"label":"artsy:master","ref":"master","sha":"d03e2dd9a18dc01f904fb20e578dc778bfd8c25c","user":{"login":"artsy","id":546231,"avatar_url":"https://avatars.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":42919437,"name":"Emergence","full_name":"artsy/Emergence","owner":{"login":"artsy","id":546231,"avatar_url":"https://avatars.githubusercontent.com/u/546231?v=3","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artsy/Emergence","description":"TV, Shows","fork":false,"url":"https://api.github.com/repos/artsy/Emergence","forks_url":"https://api.github.com/repos/artsy/Emergence/forks","keys_url":"https://api.github.com/repos/artsy/Emergence/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/Emergence/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/Emergence/teams","hooks_url":"https://api.github.com/repos/artsy/Emergence/hooks","issue_events_url":"https://api.github.com/repos/artsy/Emergence/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/Emergence/events","assignees_url":"https://api.github.com/repos/artsy/Emergence/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/Emergence/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/Emergence/tags","blobs_url":"https://api.github.com/repos/artsy/Emergence/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/Emergence/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/Emergence/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/Emergence/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/Emergence/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/Emergence/languages","stargazers_url":"https://api.github.com/repos/artsy/Emergence/stargazers","contributors_url":"https://api.github.com/repos/artsy/Emergence/contributors","subscribers_url":"https://api.github.com/repos/artsy/Emergence/subscribers","subscription_url":"https://api.github.com/repos/artsy/Emergence/subscription","commits_url":"https://api.github.com/repos/artsy/Emergence/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/Emergence/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/Emergence/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/Emergence/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/Emergence/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/Emergence/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/Emergence/merges","archive_url":"https://api.github.com/repos/artsy/Emergence/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/Emergence/downloads","issues_url":"https://api.github.com/repos/artsy/Emergence/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/Emergence/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/Emergence/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/Emergence/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/Emergence/labels{/name}","releases_url":"https://api.github.com/repos/artsy/Emergence/releases{/id}","created_at":"2015-09-22T07:51:26Z","updated_at":"2015-10-12T13:39:49Z","pushed_at":"2015-10-12T16:40:58Z","git_url":"git://github.com/artsy/Emergence.git","ssh_url":"git@github.com:artsy/Emergence.git","clone_url":"https://github.com/artsy/Emergence.git","svn_url":"https://github.com/artsy/Emergence","homepage":"","size":716,"stargazers_count":26,"watchers_count":26,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsy/Emergence/pulls/10"},"html":{"href":"https://github.com/artsy/Emergence/pull/10"},"issue":{"href":"https://api.github.com/repos/artsy/Emergence/issues/10"},"comments":{"href":"https://api.github.com/repos/artsy/Emergence/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/artsy/Emergence/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/artsy/Emergence/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsy/Emergence/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/artsy/Emergence/statuses/8b0c74c79ab46f9c03550f35c98d5e2125df9f5b"}}}}