{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments/72338629","id":72338629,"diff_hunk":"@@ -0,0 +1,135 @@\n+//\n+//  CollectionViewController.swift\n+//  CollectionView\n+//\n+//  Created by Marius Rackwitz on 14.6.16.\n+//  Copyright © 2016 Realm. All rights reserved.\n+//\n+\n+import UIKit\n+import RealmSwift\n+\n+class DemoObject: Object {\n+    dynamic var title = \"\"\n+    dynamic var date = NSDate()\n+}\n+\n+class Cell: UICollectionViewCell {\n+    @IBOutlet var label: UILabel!\n+    @IBOutlet var dateLabel: UILabel!\n+\n+    static var dateFormatter: NSDateFormatter = {\n+        let dateFormatter = NSDateFormatter()\n+        dateFormatter.dateStyle = .ShortStyle\n+        dateFormatter.timeStyle = .ShortStyle\n+        return dateFormatter\n+    }()\n+\n+    func attach(object: DemoObject) {\n+        label.text = object.title\n+        dateLabel.text = Cell.dateFormatter.stringFromDate(object.date)\n+    }\n+}\n+\n+class CollectionViewController: UICollectionViewController {\n+    var notificationToken: NotificationToken? = nil\n+\n+    lazy var realm = try! Realm()\n+    lazy var results: Results<DemoObject> = {","path":"examples/ios/swift-2.2/CollectionView/CollectionViewController.swift","position":38,"original_position":38,"commit_id":"5dc9543d532c6f87e32a7f99495ba498c6d14311","original_commit_id":"5dc9543d532c6f87e32a7f99495ba498c6d14311","user":{"login":"jpsim","id":474794,"avatar_url":"https://avatars.githubusercontent.com/u/474794?v=3","gravatar_id":"","url":"https://api.github.com/users/jpsim","html_url":"https://github.com/jpsim","followers_url":"https://api.github.com/users/jpsim/followers","following_url":"https://api.github.com/users/jpsim/following{/other_user}","gists_url":"https://api.github.com/users/jpsim/gists{/gist_id}","starred_url":"https://api.github.com/users/jpsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpsim/subscriptions","organizations_url":"https://api.github.com/users/jpsim/orgs","repos_url":"https://api.github.com/users/jpsim/repos","events_url":"https://api.github.com/users/jpsim/events{/privacy}","received_events_url":"https://api.github.com/users/jpsim/received_events","type":"User","site_admin":false},"body":"why is the closure useful here?","created_at":"2016-07-26T21:14:08Z","updated_at":"2016-07-26T21:14:08Z","html_url":"https://github.com/realm/realm-cocoa/pull/3745#discussion_r72338629","pull_request_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments/72338629"},"html":{"href":"https://github.com/realm/realm-cocoa/pull/3745#discussion_r72338629"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745","id":73811102,"html_url":"https://github.com/realm/realm-cocoa/pull/3745","diff_url":"https://github.com/realm/realm-cocoa/pull/3745.diff","patch_url":"https://github.com/realm/realm-cocoa/pull/3745.patch","issue_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3745","number":3745,"state":"open","locked":false,"title":"[Examples ios swift] Add CollectionView example app target","user":{"login":"mrackwitz","id":1389011,"avatar_url":"https://avatars.githubusercontent.com/u/1389011?v=3","gravatar_id":"","url":"https://api.github.com/users/mrackwitz","html_url":"https://github.com/mrackwitz","followers_url":"https://api.github.com/users/mrackwitz/followers","following_url":"https://api.github.com/users/mrackwitz/following{/other_user}","gists_url":"https://api.github.com/users/mrackwitz/gists{/gist_id}","starred_url":"https://api.github.com/users/mrackwitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrackwitz/subscriptions","organizations_url":"https://api.github.com/users/mrackwitz/orgs","repos_url":"https://api.github.com/users/mrackwitz/repos","events_url":"https://api.github.com/users/mrackwitz/events{/privacy}","received_events_url":"https://api.github.com/users/mrackwitz/received_events","type":"User","site_admin":false},"body":"Adds a sample using a `UICollectionView`, which needs little different glue code to propagate changes from our fine-grained notifications to the collection view. This is mainly intended as a reference for our users.\r\n\r\n/c @icanzilb @TimOliver ","created_at":"2016-06-14T20:49:08Z","updated_at":"2016-07-26T21:14:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84c6b6b6783ff2b9b265d1b605060126bd21a273","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745/commits","review_comments_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745/comments","review_comment_url":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3745/comments","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/5dc9543d532c6f87e32a7f99495ba498c6d14311","head":{"label":"realm:mr/example/collectionview","ref":"mr/example/collectionview","sha":"5dc9543d532c6f87e32a7f99495ba498c6d14311","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4044891,"name":"realm-cocoa","full_name":"realm/realm-cocoa","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-cocoa","description":"Realm is a mobile database: a replacement for Core Data & SQLite","fork":false,"url":"https://api.github.com/repos/realm/realm-cocoa","forks_url":"https://api.github.com/repos/realm/realm-cocoa/forks","keys_url":"https://api.github.com/repos/realm/realm-cocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-cocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-cocoa/teams","hooks_url":"https://api.github.com/repos/realm/realm-cocoa/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-cocoa/events","assignees_url":"https://api.github.com/repos/realm/realm-cocoa/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-cocoa/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-cocoa/tags","blobs_url":"https://api.github.com/repos/realm/realm-cocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-cocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-cocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-cocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-cocoa/languages","stargazers_url":"https://api.github.com/repos/realm/realm-cocoa/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-cocoa/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-cocoa/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-cocoa/subscription","commits_url":"https://api.github.com/repos/realm/realm-cocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-cocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-cocoa/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-cocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-cocoa/merges","archive_url":"https://api.github.com/repos/realm/realm-cocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-cocoa/downloads","issues_url":"https://api.github.com/repos/realm/realm-cocoa/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-cocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-cocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-cocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-cocoa/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-cocoa/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-cocoa/deployments","created_at":"2012-04-16T20:06:56Z","updated_at":"2016-07-26T08:45:49Z","pushed_at":"2016-07-26T20:57:49Z","git_url":"git://github.com/realm/realm-cocoa.git","ssh_url":"git@github.com:realm/realm-cocoa.git","clone_url":"https://github.com/realm/realm-cocoa.git","svn_url":"https://github.com/realm/realm-cocoa","homepage":"https://realm.io","size":122649,"stargazers_count":8354,"watchers_count":8354,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":973,"mirror_url":null,"open_issues_count":190,"forks":973,"open_issues":190,"watchers":8354,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"90113193edc9a1d7f47dcacf56db7eaa8e7ce328","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":4044891,"name":"realm-cocoa","full_name":"realm/realm-cocoa","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-cocoa","description":"Realm is a mobile database: a replacement for Core Data & SQLite","fork":false,"url":"https://api.github.com/repos/realm/realm-cocoa","forks_url":"https://api.github.com/repos/realm/realm-cocoa/forks","keys_url":"https://api.github.com/repos/realm/realm-cocoa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-cocoa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-cocoa/teams","hooks_url":"https://api.github.com/repos/realm/realm-cocoa/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-cocoa/events","assignees_url":"https://api.github.com/repos/realm/realm-cocoa/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-cocoa/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-cocoa/tags","blobs_url":"https://api.github.com/repos/realm/realm-cocoa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-cocoa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-cocoa/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-cocoa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-cocoa/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-cocoa/languages","stargazers_url":"https://api.github.com/repos/realm/realm-cocoa/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-cocoa/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-cocoa/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-cocoa/subscription","commits_url":"https://api.github.com/repos/realm/realm-cocoa/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-cocoa/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-cocoa/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-cocoa/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-cocoa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-cocoa/merges","archive_url":"https://api.github.com/repos/realm/realm-cocoa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-cocoa/downloads","issues_url":"https://api.github.com/repos/realm/realm-cocoa/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-cocoa/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-cocoa/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-cocoa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-cocoa/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-cocoa/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-cocoa/deployments","created_at":"2012-04-16T20:06:56Z","updated_at":"2016-07-26T08:45:49Z","pushed_at":"2016-07-26T20:57:49Z","git_url":"git://github.com/realm/realm-cocoa.git","ssh_url":"git@github.com:realm/realm-cocoa.git","clone_url":"https://github.com/realm/realm-cocoa.git","svn_url":"https://github.com/realm/realm-cocoa","homepage":"https://realm.io","size":122649,"stargazers_count":8354,"watchers_count":8354,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":973,"mirror_url":null,"open_issues_count":190,"forks":973,"open_issues":190,"watchers":8354,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745"},"html":{"href":"https://github.com/realm/realm-cocoa/pull/3745"},"issue":{"href":"https://api.github.com/repos/realm/realm-cocoa/issues/3745"},"comments":{"href":"https://api.github.com/repos/realm/realm-cocoa/issues/3745/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-cocoa/pulls/3745/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-cocoa/statuses/5dc9543d532c6f87e32a7f99495ba498c6d14311"}}}}
{"actor":{"display_login":"jpsim"}}