{"action":"created","comment":{"url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments/62690566","id":62690566,"diff_hunk":"@@ -0,0 +1,92 @@\n+//\n+//  URBNSwCarouselTransitionController.swift\n+//  Pods\n+//\n+//  Created by Kevin Taniguchi on 4/25/16.\n+//\n+//\n+\n+\n+/**\n+ Animation controller built to handle transitions between two images in separate view controllers.\n+ By default, this class supports non-interactive transitions. To enable interactive transitions, register\n+ a view for them using the registration method provided.\n+ \n+ This class implements the UIViewControllerTransitioningDelegate protocol. As a consumer, you only need to implement\n+ the URBNCarouselTransitioning protocol.\n+ \n+ For the time being, this controller only supports transitions between images.\n+ */\n+\n+\n+public class URBNSwCarouselTransitionController: NSObject, UIViewControllerAnimatedTransitioning, UIViewControllerTransitioningDelegate {\n+    private weak var context: UIViewControllerContextTransitioning?\n+    private var transitionView = UIImageView()\n+    private var originalSelectedCellFrame = CGRectZero\n+    private var springCompletionSpeed: CGFloat = 0.7\n+    private var sourceViewController: UIViewController?\n+    public var presentationController: URBNPresentationController?\n+    \n+    // MARK: UIViewControllerAnimatedTransitioning Delegate Methods - Non-Interactive\n+    public func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {\n+        return 0.5\n+    }\n+    \n+    public func animateTransition(transitionContext: UIViewControllerContextTransitioning) {\n+        \n+        guard let fromVC = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey),\n+            toVC = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)\n+            else { return }\n+        \n+        let fromView = fromVC.view\n+        let toView = toVC.view\n+        \n+        guard let topToVC = trueContextViewControllerFromContext(transitionContext, key: UITransitionContextToViewControllerKey) as? URBNSwCarouselTransitioning else { return }","path":"URBNSwiftCarousel/Classes/URBNSwCarouselTransitionController.swift","position":44,"original_position":44,"commit_id":"170a63d084b5fd6c8da112a1b89ec194e86eb3b6","original_commit_id":"170a63d084b5fd6c8da112a1b89ec194e86eb3b6","user":{"login":"KVTaniguchi","id":4974425,"avatar_url":"https://avatars.githubusercontent.com/u/4974425?v=3","gravatar_id":"","url":"https://api.github.com/users/KVTaniguchi","html_url":"https://github.com/KVTaniguchi","followers_url":"https://api.github.com/users/KVTaniguchi/followers","following_url":"https://api.github.com/users/KVTaniguchi/following{/other_user}","gists_url":"https://api.github.com/users/KVTaniguchi/gists{/gist_id}","starred_url":"https://api.github.com/users/KVTaniguchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KVTaniguchi/subscriptions","organizations_url":"https://api.github.com/users/KVTaniguchi/orgs","repos_url":"https://api.github.com/users/KVTaniguchi/repos","events_url":"https://api.github.com/users/KVTaniguchi/events{/privacy}","received_events_url":"https://api.github.com/users/KVTaniguchi/received_events","type":"User","site_admin":false},"body":"add assert","created_at":"2016-05-10T15:12:17Z","updated_at":"2016-05-10T15:12:17Z","html_url":"https://github.com/urbn/URBNSwiftCarousel/pull/3#discussion_r62690566","pull_request_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments/62690566"},"html":{"href":"https://github.com/urbn/URBNSwiftCarousel/pull/3#discussion_r62690566"},"pull_request":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3","id":69161028,"html_url":"https://github.com/urbn/URBNSwiftCarousel/pull/3","diff_url":"https://github.com/urbn/URBNSwiftCarousel/pull/3.diff","patch_url":"https://github.com/urbn/URBNSwiftCarousel/pull/3.patch","issue_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/3","number":3,"state":"open","locked":false,"title":"Comparing all the things. From the beginning.","user":{"login":"jgrandelli","id":1181839,"avatar_url":"https://avatars.githubusercontent.com/u/1181839?v=3","gravatar_id":"","url":"https://api.github.com/users/jgrandelli","html_url":"https://github.com/jgrandelli","followers_url":"https://api.github.com/users/jgrandelli/followers","following_url":"https://api.github.com/users/jgrandelli/following{/other_user}","gists_url":"https://api.github.com/users/jgrandelli/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrandelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrandelli/subscriptions","organizations_url":"https://api.github.com/users/jgrandelli/orgs","repos_url":"https://api.github.com/users/jgrandelli/repos","events_url":"https://api.github.com/users/jgrandelli/events{/privacy}","received_events_url":"https://api.github.com/users/jgrandelli/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-06T14:44:36Z","updated_at":"2016-05-10T15:12:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db4018f848b75f5073e031f99345a0ada1edfbaa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3/commits","review_comments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3/comments","review_comment_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/3/comments","statuses_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/statuses/170a63d084b5fd6c8da112a1b89ec194e86eb3b6","head":{"label":"urbn:old-master","ref":"old-master","sha":"170a63d084b5fd6c8da112a1b89ec194e86eb3b6","user":{"login":"urbn","id":4368103,"avatar_url":"https://avatars.githubusercontent.com/u/4368103?v=3","gravatar_id":"","url":"https://api.github.com/users/urbn","html_url":"https://github.com/urbn","followers_url":"https://api.github.com/users/urbn/followers","following_url":"https://api.github.com/users/urbn/following{/other_user}","gists_url":"https://api.github.com/users/urbn/gists{/gist_id}","starred_url":"https://api.github.com/users/urbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbn/subscriptions","organizations_url":"https://api.github.com/users/urbn/orgs","repos_url":"https://api.github.com/users/urbn/repos","events_url":"https://api.github.com/users/urbn/events{/privacy}","received_events_url":"https://api.github.com/users/urbn/received_events","type":"Organization","site_admin":false},"repo":{"id":57163825,"name":"URBNSwiftCarousel","full_name":"urbn/URBNSwiftCarousel","owner":{"login":"urbn","id":4368103,"avatar_url":"https://avatars.githubusercontent.com/u/4368103?v=3","gravatar_id":"","url":"https://api.github.com/users/urbn","html_url":"https://github.com/urbn","followers_url":"https://api.github.com/users/urbn/followers","following_url":"https://api.github.com/users/urbn/following{/other_user}","gists_url":"https://api.github.com/users/urbn/gists{/gist_id}","starred_url":"https://api.github.com/users/urbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbn/subscriptions","organizations_url":"https://api.github.com/users/urbn/orgs","repos_url":"https://api.github.com/users/urbn/repos","events_url":"https://api.github.com/users/urbn/events{/privacy}","received_events_url":"https://api.github.com/users/urbn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urbn/URBNSwiftCarousel","description":"Side Scrolling Carousel for Images in iOS, written in Swift.","fork":false,"url":"https://api.github.com/repos/urbn/URBNSwiftCarousel","forks_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/forks","keys_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/teams","hooks_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/hooks","issue_events_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/events{/number}","events_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/events","assignees_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/assignees{/user}","branches_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/branches{/branch}","tags_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/tags","blobs_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/refs{/sha}","trees_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/statuses/{sha}","languages_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/languages","stargazers_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/stargazers","contributors_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/contributors","subscribers_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/subscribers","subscription_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/subscription","commits_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/commits{/sha}","git_commits_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/commits{/sha}","comments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/comments{/number}","issue_comment_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/comments{/number}","contents_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/contents/{+path}","compare_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/merges","archive_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/downloads","issues_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues{/number}","pulls_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls{/number}","milestones_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/milestones{/number}","notifications_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/labels{/name}","releases_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/releases{/id}","deployments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/deployments","created_at":"2016-04-26T21:41:57Z","updated_at":"2016-05-06T14:38:03Z","pushed_at":"2016-05-09T21:24:27Z","git_url":"git://github.com/urbn/URBNSwiftCarousel.git","ssh_url":"git@github.com:urbn/URBNSwiftCarousel.git","clone_url":"https://github.com/urbn/URBNSwiftCarousel.git","svn_url":"https://github.com/urbn/URBNSwiftCarousel","homepage":null,"size":121,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"urbn:master-reset","ref":"master-reset","sha":"96b89c6ae576b5e2c866ea511146b079c67df399","user":{"login":"urbn","id":4368103,"avatar_url":"https://avatars.githubusercontent.com/u/4368103?v=3","gravatar_id":"","url":"https://api.github.com/users/urbn","html_url":"https://github.com/urbn","followers_url":"https://api.github.com/users/urbn/followers","following_url":"https://api.github.com/users/urbn/following{/other_user}","gists_url":"https://api.github.com/users/urbn/gists{/gist_id}","starred_url":"https://api.github.com/users/urbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbn/subscriptions","organizations_url":"https://api.github.com/users/urbn/orgs","repos_url":"https://api.github.com/users/urbn/repos","events_url":"https://api.github.com/users/urbn/events{/privacy}","received_events_url":"https://api.github.com/users/urbn/received_events","type":"Organization","site_admin":false},"repo":{"id":57163825,"name":"URBNSwiftCarousel","full_name":"urbn/URBNSwiftCarousel","owner":{"login":"urbn","id":4368103,"avatar_url":"https://avatars.githubusercontent.com/u/4368103?v=3","gravatar_id":"","url":"https://api.github.com/users/urbn","html_url":"https://github.com/urbn","followers_url":"https://api.github.com/users/urbn/followers","following_url":"https://api.github.com/users/urbn/following{/other_user}","gists_url":"https://api.github.com/users/urbn/gists{/gist_id}","starred_url":"https://api.github.com/users/urbn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbn/subscriptions","organizations_url":"https://api.github.com/users/urbn/orgs","repos_url":"https://api.github.com/users/urbn/repos","events_url":"https://api.github.com/users/urbn/events{/privacy}","received_events_url":"https://api.github.com/users/urbn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urbn/URBNSwiftCarousel","description":"Side Scrolling Carousel for Images in iOS, written in Swift.","fork":false,"url":"https://api.github.com/repos/urbn/URBNSwiftCarousel","forks_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/forks","keys_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/teams","hooks_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/hooks","issue_events_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/events{/number}","events_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/events","assignees_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/assignees{/user}","branches_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/branches{/branch}","tags_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/tags","blobs_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/refs{/sha}","trees_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/statuses/{sha}","languages_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/languages","stargazers_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/stargazers","contributors_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/contributors","subscribers_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/subscribers","subscription_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/subscription","commits_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/commits{/sha}","git_commits_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/git/commits{/sha}","comments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/comments{/number}","issue_comment_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/comments{/number}","contents_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/contents/{+path}","compare_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/merges","archive_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/downloads","issues_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues{/number}","pulls_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls{/number}","milestones_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/milestones{/number}","notifications_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/labels{/name}","releases_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/releases{/id}","deployments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/deployments","created_at":"2016-04-26T21:41:57Z","updated_at":"2016-05-06T14:38:03Z","pushed_at":"2016-05-09T21:24:27Z","git_url":"git://github.com/urbn/URBNSwiftCarousel.git","ssh_url":"git@github.com:urbn/URBNSwiftCarousel.git","clone_url":"https://github.com/urbn/URBNSwiftCarousel.git","svn_url":"https://github.com/urbn/URBNSwiftCarousel","homepage":null,"size":121,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3"},"html":{"href":"https://github.com/urbn/URBNSwiftCarousel/pull/3"},"issue":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/3"},"comments":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/statuses/170a63d084b5fd6c8da112a1b89ec194e86eb3b6"}}}}