{"action":"created","comment":{"url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments/61573187","id":61573187,"diff_hunk":"@@ -7,4 +7,341 @@\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, UIViewControllerInteractiveTransitioning, UIGestureRecognizerDelegate {\n+    private(set) var interactive = false\n+    private var viewInteractionBlocks = [UIView: URBNCarouselViewInteractionBeganClosure]()\n+    private var viewPinchTransitionGestureRecognizers = [UIView: UIPinchGestureRecognizer]()\n+    private weak var context: UIViewControllerContextTransitioning?\n+    private var transitionView = UIImageView()\n+    private var originalSelectedCellFrame = CGRectZero\n+    private var startScale: CGFloat = -1.0\n+    private var springCompletionSpeed: Double = 0.6\n+    private var completionSpeed: Double = 0.2\n+    private var sourceViewController = UIViewController()\n+\n+    public weak var interactiveDelegate: URBNSwCarouselInteractiveDelegate?\n+    \n+    \n+    // MARK: Set Up and Tear Down\n+    func restoreTransitionViewToState(state: URBNCarouselTransitionState, context: UIViewControllerContextTransitioning) {\n+        \n+        guard let topFromVC = trueContextViewControllerFromContext(context, key: UITransitionContextFromViewControllerKey) as? URBNSwCarouselTransitioning, topToVC = trueContextViewControllerFromContext(context, key: UITransitionContextToViewControllerKey) as? URBNSwCarouselTransitioning, containerView = context.containerView() else {\n+            print(\"Warning : make sure  all VC's being passed in conform to the URBNSwCarouselTransitioning protocol\")","path":"URBNSwiftCarousel/Classes/URBNSwCarouselTransitionController.swift","position":35,"original_position":35,"commit_id":"762f4d75a8b39b3d4184c89b710b58e7e45d9e74","original_commit_id":"762f4d75a8b39b3d4184c89b710b58e7e45d9e74","user":{"login":"ndis1","id":2287679,"avatar_url":"https://avatars.githubusercontent.com/u/2287679?v=3","gravatar_id":"","url":"https://api.github.com/users/ndis1","html_url":"https://github.com/ndis1","followers_url":"https://api.github.com/users/ndis1/followers","following_url":"https://api.github.com/users/ndis1/following{/other_user}","gists_url":"https://api.github.com/users/ndis1/gists{/gist_id}","starred_url":"https://api.github.com/users/ndis1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndis1/subscriptions","organizations_url":"https://api.github.com/users/ndis1/orgs","repos_url":"https://api.github.com/users/ndis1/repos","events_url":"https://api.github.com/users/ndis1/events{/privacy}","received_events_url":"https://api.github.com/users/ndis1/received_events","type":"User","site_admin":false},"body":"do we want to print or assert here? I usually do `assertionFailure(message)`","created_at":"2016-04-29T13:05:05Z","updated_at":"2016-04-29T13:05:05Z","html_url":"https://github.com/urbn/URBNSwiftCarousel/pull/1#discussion_r61573187","pull_request_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments/61573187"},"html":{"href":"https://github.com/urbn/URBNSwiftCarousel/pull/1#discussion_r61573187"},"pull_request":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1","id":68155348,"html_url":"https://github.com/urbn/URBNSwiftCarousel/pull/1","diff_url":"https://github.com/urbn/URBNSwiftCarousel/pull/1.diff","patch_url":"https://github.com/urbn/URBNSwiftCarousel/pull/1.patch","issue_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/1","number":1,"state":"open","locked":false,"title":"Dev","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":"The purpose of this PR is to expose all the files of URBNSwiftCarousel for review.","created_at":"2016-04-28T02:35:27Z","updated_at":"2016-04-29T13:05:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b37a2eb5b0db6cc7271fa07624bc014fd630e1fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1/commits","review_comments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1/comments","review_comment_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/1/comments","statuses_url":"https://api.github.com/repos/urbn/URBNSwiftCarousel/statuses/762f4d75a8b39b3d4184c89b710b58e7e45d9e74","head":{"label":"urbn:dev","ref":"dev","sha":"762f4d75a8b39b3d4184c89b710b58e7e45d9e74","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-04-28T02:21:29Z","pushed_at":"2016-04-29T03:28:49Z","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":136,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"urbn:master","ref":"master","sha":"72fb2e94ac28736b0cd5da44d938ead35dac17ac","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-04-28T02:21:29Z","pushed_at":"2016-04-29T03:28:49Z","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":136,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1"},"html":{"href":"https://github.com/urbn/URBNSwiftCarousel/pull/1"},"issue":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/1"},"comments":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/urbn/URBNSwiftCarousel/statuses/762f4d75a8b39b3d4184c89b710b58e7e45d9e74"}}}}