{"action":"created","comment":{"url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/comments/79552192","id":79552192,"diff_hunk":"@@ -136,53 +136,53 @@ public class ViewerController: UIViewController {\n \n         if presented {\n             self.scrollView.configure()\n-            if !self.collectionView.indexPathsForVisibleItems().contains(self.currentIndexPath) {\n-                self.collectionView.scrollToItemAtIndexPath(self.currentIndexPath, atScrollPosition: .Bottom, animated: true)\n+            if !self.collectionView.indexPathsForVisibleItems.contains(self.currentIndexPath) {\n+                self.collectionView.scrollToItem(at: self.currentIndexPath, at: .bottom, animated: true)\n             }\n         }\n     }\n \n-    public override func viewDidAppear(animated: Bool) {\n+    public override func viewDidAppear(_ animated: Bool) {\n         super.viewDidAppear(animated)\n \n-        self.present(self.initialIndexPath, completion: nil)\n+        self.present(with: self.initialIndexPath, completion: nil)\n     }\n }\n \n extension ViewerController {\n     #if os(iOS)\n-    public override func prefersStatusBarHidden() -> Bool {\n-        let orientation = UIApplication.sharedApplication().statusBarOrientation\n+    public override var prefersStatusBarHidden : Bool {\n+        let orientation = UIApplication.shared.statusBarOrientation\n         if UIInterfaceOrientationIsLandscape(orientation) {\n             return true\n         }\n \n         return self.shouldHideStatusBar\n     }\n \n-    public override func preferredStatusBarStyle() -> UIStatusBarStyle {\n+    public override var preferredStatusBarStyle : UIStatusBarStyle {\n         if self.shouldUseLightStatusBar {\n-            return .LightContent\n+            return .lightContent\n         } else {\n-            return self.presentingViewController?.preferredStatusBarStyle() ?? .Default\n+            return self.presentingViewController?.preferredStatusBarStyle ?? .default\n         }\n     }\n     #endif\n \n     private func presentedViewCopy() -> UIImageView {\n         let presentedView = UIImageView()\n-        presentedView.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]\n-        presentedView.contentMode = .ScaleAspectFill\n+        presentedView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n+        presentedView.contentMode = .scaleAspectFill\n         presentedView.clipsToBounds = true\n \n         return presentedView\n     }\n \n-    private func findOrCreateViewerItemController(indexPath: NSIndexPath) -> ViewerItemController {\n+    fileprivate func findOrCreateViewerItemController(_ indexPath: IndexPath) -> ViewerItemController {\n         let viewerItem = self.controllerDataSource!.viewerController(self, itemAtIndexPath: indexPath)\n         var viewerItemController: ViewerItemController\n \n-        if let cachedController = self.viewerItemControllerCache.objectForKey(viewerItem.id) as? ViewerItemController {\n+        if let cachedController = self.viewerItemControllerCache.object(forKey: viewerItem.id as NSString) {","path":"Source/ViewerController.swift","position":194,"original_position":194,"commit_id":"14e907aa983eeb60cd32e8fcfd6ce5379af36512","original_commit_id":"15adf3f5931f6133d2c1d720fa20614b24b3bab4","user":{"login":"3lvis","id":1088217,"avatar_url":"https://avatars.githubusercontent.com/u/1088217?v=3","gravatar_id":"","url":"https://api.github.com/users/3lvis","html_url":"https://github.com/3lvis","followers_url":"https://api.github.com/users/3lvis/followers","following_url":"https://api.github.com/users/3lvis/following{/other_user}","gists_url":"https://api.github.com/users/3lvis/gists{/gist_id}","starred_url":"https://api.github.com/users/3lvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3lvis/subscriptions","organizations_url":"https://api.github.com/users/3lvis/orgs","repos_url":"https://api.github.com/users/3lvis/repos","events_url":"https://api.github.com/users/3lvis/events{/privacy}","received_events_url":"https://api.github.com/users/3lvis/received_events","type":"User","site_admin":false},"body":"Seems like NSCache wasn't converted to use `Any` and was left with AnyObject, making things weird.","created_at":"2016-09-20T07:46:24Z","updated_at":"2016-09-20T07:46:24Z","html_url":"https://github.com/bakkenbaeck/Viewer/pull/51#discussion_r79552192","pull_request_url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51","_links":{"self":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/comments/79552192"},"html":{"href":"https://github.com/bakkenbaeck/Viewer/pull/51#discussion_r79552192"},"pull_request":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51"}}},"pull_request":{"url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51","id":85264462,"html_url":"https://github.com/bakkenbaeck/Viewer/pull/51","diff_url":"https://github.com/bakkenbaeck/Viewer/pull/51.diff","patch_url":"https://github.com/bakkenbaeck/Viewer/pull/51.patch","issue_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/51","number":51,"state":"open","locked":false,"title":"Swift 3","user":{"login":"3lvis","id":1088217,"avatar_url":"https://avatars.githubusercontent.com/u/1088217?v=3","gravatar_id":"","url":"https://api.github.com/users/3lvis","html_url":"https://github.com/3lvis","followers_url":"https://api.github.com/users/3lvis/followers","following_url":"https://api.github.com/users/3lvis/following{/other_user}","gists_url":"https://api.github.com/users/3lvis/gists{/gist_id}","starred_url":"https://api.github.com/users/3lvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3lvis/subscriptions","organizations_url":"https://api.github.com/users/3lvis/orgs","repos_url":"https://api.github.com/users/3lvis/repos","events_url":"https://api.github.com/users/3lvis/events{/privacy}","received_events_url":"https://api.github.com/users/3lvis/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-14T16:47:26Z","updated_at":"2016-09-20T07:46:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b82b6d31d025a030690052cb9d3aa1189f19f40b","assignee":{"login":"Elland","id":54423,"avatar_url":"https://avatars.githubusercontent.com/u/54423?v=3","gravatar_id":"","url":"https://api.github.com/users/Elland","html_url":"https://github.com/Elland","followers_url":"https://api.github.com/users/Elland/followers","following_url":"https://api.github.com/users/Elland/following{/other_user}","gists_url":"https://api.github.com/users/Elland/gists{/gist_id}","starred_url":"https://api.github.com/users/Elland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elland/subscriptions","organizations_url":"https://api.github.com/users/Elland/orgs","repos_url":"https://api.github.com/users/Elland/repos","events_url":"https://api.github.com/users/Elland/events{/privacy}","received_events_url":"https://api.github.com/users/Elland/received_events","type":"User","site_admin":false},"assignees":[{"login":"Elland","id":54423,"avatar_url":"https://avatars.githubusercontent.com/u/54423?v=3","gravatar_id":"","url":"https://api.github.com/users/Elland","html_url":"https://github.com/Elland","followers_url":"https://api.github.com/users/Elland/followers","following_url":"https://api.github.com/users/Elland/following{/other_user}","gists_url":"https://api.github.com/users/Elland/gists{/gist_id}","starred_url":"https://api.github.com/users/Elland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elland/subscriptions","organizations_url":"https://api.github.com/users/Elland/orgs","repos_url":"https://api.github.com/users/Elland/repos","events_url":"https://api.github.com/users/Elland/events{/privacy}","received_events_url":"https://api.github.com/users/Elland/received_events","type":"User","site_admin":false},{"login":"marijnschilling","id":1125417,"avatar_url":"https://avatars.githubusercontent.com/u/1125417?v=3","gravatar_id":"","url":"https://api.github.com/users/marijnschilling","html_url":"https://github.com/marijnschilling","followers_url":"https://api.github.com/users/marijnschilling/followers","following_url":"https://api.github.com/users/marijnschilling/following{/other_user}","gists_url":"https://api.github.com/users/marijnschilling/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnschilling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnschilling/subscriptions","organizations_url":"https://api.github.com/users/marijnschilling/orgs","repos_url":"https://api.github.com/users/marijnschilling/repos","events_url":"https://api.github.com/users/marijnschilling/events{/privacy}","received_events_url":"https://api.github.com/users/marijnschilling/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51/commits","review_comments_url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51/comments","review_comment_url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/51/comments","statuses_url":"https://api.github.com/repos/bakkenbaeck/Viewer/statuses/14e907aa983eeb60cd32e8fcfd6ce5379af36512","head":{"label":"bakkenbaeck:swift-3","ref":"swift-3","sha":"14e907aa983eeb60cd32e8fcfd6ce5379af36512","user":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars.githubusercontent.com/u/2485680?v=3","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"repo":{"id":46755661,"name":"Viewer","full_name":"bakkenbaeck/Viewer","owner":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars.githubusercontent.com/u/2485680?v=3","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bakkenbaeck/Viewer","description":"Image viewer (or Lightbox) with support for local and remote videos and images","fork":false,"url":"https://api.github.com/repos/bakkenbaeck/Viewer","forks_url":"https://api.github.com/repos/bakkenbaeck/Viewer/forks","keys_url":"https://api.github.com/repos/bakkenbaeck/Viewer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bakkenbaeck/Viewer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bakkenbaeck/Viewer/teams","hooks_url":"https://api.github.com/repos/bakkenbaeck/Viewer/hooks","issue_events_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/events{/number}","events_url":"https://api.github.com/repos/bakkenbaeck/Viewer/events","assignees_url":"https://api.github.com/repos/bakkenbaeck/Viewer/assignees{/user}","branches_url":"https://api.github.com/repos/bakkenbaeck/Viewer/branches{/branch}","tags_url":"https://api.github.com/repos/bakkenbaeck/Viewer/tags","blobs_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/refs{/sha}","trees_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bakkenbaeck/Viewer/statuses/{sha}","languages_url":"https://api.github.com/repos/bakkenbaeck/Viewer/languages","stargazers_url":"https://api.github.com/repos/bakkenbaeck/Viewer/stargazers","contributors_url":"https://api.github.com/repos/bakkenbaeck/Viewer/contributors","subscribers_url":"https://api.github.com/repos/bakkenbaeck/Viewer/subscribers","subscription_url":"https://api.github.com/repos/bakkenbaeck/Viewer/subscription","commits_url":"https://api.github.com/repos/bakkenbaeck/Viewer/commits{/sha}","git_commits_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/commits{/sha}","comments_url":"https://api.github.com/repos/bakkenbaeck/Viewer/comments{/number}","issue_comment_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/comments{/number}","contents_url":"https://api.github.com/repos/bakkenbaeck/Viewer/contents/{+path}","compare_url":"https://api.github.com/repos/bakkenbaeck/Viewer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bakkenbaeck/Viewer/merges","archive_url":"https://api.github.com/repos/bakkenbaeck/Viewer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bakkenbaeck/Viewer/downloads","issues_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues{/number}","pulls_url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls{/number}","milestones_url":"https://api.github.com/repos/bakkenbaeck/Viewer/milestones{/number}","notifications_url":"https://api.github.com/repos/bakkenbaeck/Viewer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bakkenbaeck/Viewer/labels{/name}","releases_url":"https://api.github.com/repos/bakkenbaeck/Viewer/releases{/id}","deployments_url":"https://api.github.com/repos/bakkenbaeck/Viewer/deployments","created_at":"2015-11-23T23:59:42Z","updated_at":"2016-09-02T16:26:18Z","pushed_at":"2016-09-20T07:44:53Z","git_url":"git://github.com/bakkenbaeck/Viewer.git","ssh_url":"git@github.com:bakkenbaeck/Viewer.git","clone_url":"https://github.com/bakkenbaeck/Viewer.git","svn_url":"https://github.com/bakkenbaeck/Viewer","homepage":"","size":34185,"stargazers_count":4,"watchers_count":4,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"master"}},"base":{"label":"bakkenbaeck:master","ref":"master","sha":"7f52a9a2e5088e2d05d14c904d7f5fea0ec4bb25","user":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars.githubusercontent.com/u/2485680?v=3","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"repo":{"id":46755661,"name":"Viewer","full_name":"bakkenbaeck/Viewer","owner":{"login":"bakkenbaeck","id":2485680,"avatar_url":"https://avatars.githubusercontent.com/u/2485680?v=3","gravatar_id":"","url":"https://api.github.com/users/bakkenbaeck","html_url":"https://github.com/bakkenbaeck","followers_url":"https://api.github.com/users/bakkenbaeck/followers","following_url":"https://api.github.com/users/bakkenbaeck/following{/other_user}","gists_url":"https://api.github.com/users/bakkenbaeck/gists{/gist_id}","starred_url":"https://api.github.com/users/bakkenbaeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakkenbaeck/subscriptions","organizations_url":"https://api.github.com/users/bakkenbaeck/orgs","repos_url":"https://api.github.com/users/bakkenbaeck/repos","events_url":"https://api.github.com/users/bakkenbaeck/events{/privacy}","received_events_url":"https://api.github.com/users/bakkenbaeck/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bakkenbaeck/Viewer","description":"Image viewer (or Lightbox) with support for local and remote videos and images","fork":false,"url":"https://api.github.com/repos/bakkenbaeck/Viewer","forks_url":"https://api.github.com/repos/bakkenbaeck/Viewer/forks","keys_url":"https://api.github.com/repos/bakkenbaeck/Viewer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bakkenbaeck/Viewer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bakkenbaeck/Viewer/teams","hooks_url":"https://api.github.com/repos/bakkenbaeck/Viewer/hooks","issue_events_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/events{/number}","events_url":"https://api.github.com/repos/bakkenbaeck/Viewer/events","assignees_url":"https://api.github.com/repos/bakkenbaeck/Viewer/assignees{/user}","branches_url":"https://api.github.com/repos/bakkenbaeck/Viewer/branches{/branch}","tags_url":"https://api.github.com/repos/bakkenbaeck/Viewer/tags","blobs_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/refs{/sha}","trees_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bakkenbaeck/Viewer/statuses/{sha}","languages_url":"https://api.github.com/repos/bakkenbaeck/Viewer/languages","stargazers_url":"https://api.github.com/repos/bakkenbaeck/Viewer/stargazers","contributors_url":"https://api.github.com/repos/bakkenbaeck/Viewer/contributors","subscribers_url":"https://api.github.com/repos/bakkenbaeck/Viewer/subscribers","subscription_url":"https://api.github.com/repos/bakkenbaeck/Viewer/subscription","commits_url":"https://api.github.com/repos/bakkenbaeck/Viewer/commits{/sha}","git_commits_url":"https://api.github.com/repos/bakkenbaeck/Viewer/git/commits{/sha}","comments_url":"https://api.github.com/repos/bakkenbaeck/Viewer/comments{/number}","issue_comment_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/comments{/number}","contents_url":"https://api.github.com/repos/bakkenbaeck/Viewer/contents/{+path}","compare_url":"https://api.github.com/repos/bakkenbaeck/Viewer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bakkenbaeck/Viewer/merges","archive_url":"https://api.github.com/repos/bakkenbaeck/Viewer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bakkenbaeck/Viewer/downloads","issues_url":"https://api.github.com/repos/bakkenbaeck/Viewer/issues{/number}","pulls_url":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls{/number}","milestones_url":"https://api.github.com/repos/bakkenbaeck/Viewer/milestones{/number}","notifications_url":"https://api.github.com/repos/bakkenbaeck/Viewer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bakkenbaeck/Viewer/labels{/name}","releases_url":"https://api.github.com/repos/bakkenbaeck/Viewer/releases{/id}","deployments_url":"https://api.github.com/repos/bakkenbaeck/Viewer/deployments","created_at":"2015-11-23T23:59:42Z","updated_at":"2016-09-02T16:26:18Z","pushed_at":"2016-09-20T07:44:53Z","git_url":"git://github.com/bakkenbaeck/Viewer.git","ssh_url":"git@github.com:bakkenbaeck/Viewer.git","clone_url":"https://github.com/bakkenbaeck/Viewer.git","svn_url":"https://github.com/bakkenbaeck/Viewer","homepage":"","size":34185,"stargazers_count":4,"watchers_count":4,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51"},"html":{"href":"https://github.com/bakkenbaeck/Viewer/pull/51"},"issue":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/51"},"comments":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/bakkenbaeck/Viewer/statuses/14e907aa983eeb60cd32e8fcfd6ce5379af36512"}}}}
{"actor":{"display_login":"3lvis"}}