{"action":"created","comment":{"url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/comments/34431155","id":34431155,"diff_hunk":"@@ -6,406 +6,467 @@ Licensed Materials - Property of IBM\n import UIKit\n import QuartzCore\n \n+\n /**\n-Reusable CollectionView that acts as a horizontal scrolling number picker\n+RatingCollectionViewCell consisting of a number label that varies in size if it is the most centered cell\n+NOTE: If changing constants below, don't forget to use \"digit.0\" to avoid CGFloat / Int calculation issues\n */\n-class MILRatingCollectionView: UICollectionView {\n-    \n-    /// Number of cells visible at a time in the view. Even values will show one less cell than selected on startup, due to the view being centered on an initial value\n-    let numCellsVisible: CGFloat = 5\n+private final class RatingCollectionViewCell: UIView {\n     \n-    /// The minimum number of pixels each cell should be. Does not usually need be changed. Only takes effect when the numCellsVisible is set to a value that leaves little room for each cell.\n-    let minCellWidth: CGFloat = 35\n-    /// The size of the circle relative to the size of the cell\n-    let circleDiameterToCellWidthRatio: CGFloat = 2.0\n+    struct Constants {\n+        \n+        static let Font = \"Helvetica\"\n+        \n+        static let FontSize: CGFloat = 60\n+        \n+        static let FontHighlightedAnimationScalingTransform = CGFloat(1.1)\n+        \n+        static let NormalFontColor = UIColor(red: 128/255.0, green: 128/255.0, blue: 128/255.0, alpha: 1.0)\n+        static let HighlightedFontColor = UIColor.whiteColor()\n+        \n+        static let AnimationDuration = NSTimeInterval(0.5)\n+        \n+        // don't touch\n+        static var FontUnHighlightedAnimationScalingTransform: CGFloat { return (1 / FontHighlightedAnimationScalingTransform) }\n+        \n+    }\n     \n-    /// The background color of the circle that surrounds the selected item\n-    let circleBackgroundColor = UIColor(red: 218.0/255.0, green: 87.0/255.0, blue: 68.0/255.0, alpha: 1.0)\n     \n-    var dummyBackgroundView: UIView!\n-    var circularView: UIView!\n-    var selectedIndexPath: NSIndexPath?","path":"MILRatingCollectionView/MILRatingCollectionView.swift","position":43,"original_position":43,"commit_id":"2401c68b9e4564268c9bd8636141a61481eb1190","original_commit_id":"d550e367c453e7baad0857b7b65423bdfb9f4cc8","user":{"login":"ruslan120101","id":3612217,"avatar_url":"https://avatars.githubusercontent.com/u/3612217?v=3","gravatar_id":"","url":"https://api.github.com/users/ruslan120101","html_url":"https://github.com/ruslan120101","followers_url":"https://api.github.com/users/ruslan120101/followers","following_url":"https://api.github.com/users/ruslan120101/following{/other_user}","gists_url":"https://api.github.com/users/ruslan120101/gists{/gist_id}","starred_url":"https://api.github.com/users/ruslan120101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruslan120101/subscriptions","organizations_url":"https://api.github.com/users/ruslan120101/orgs","repos_url":"https://api.github.com/users/ruslan120101/repos","events_url":"https://api.github.com/users/ruslan120101/events{/privacy}","received_events_url":"https://api.github.com/users/ruslan120101/received_events","type":"User","site_admin":false},"body":"**facepalm** fixed \r\n\r\nhttps://github.com/IBM-MIL/MILRatingCollectionView/commit/5edd45e4f5d4333cc7a6ba791bf01620dea241cf","created_at":"2015-07-13T03:15:58Z","updated_at":"2015-07-13T03:15:58Z","html_url":"https://github.com/IBM-MIL/MILRatingCollectionView/pull/5#discussion_r34431155","pull_request_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/comments/34431155"},"html":{"href":"https://github.com/IBM-MIL/MILRatingCollectionView/pull/5#discussion_r34431155"},"pull_request":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5","id":39128290,"html_url":"https://github.com/IBM-MIL/MILRatingCollectionView/pull/5","diff_url":"https://github.com/IBM-MIL/MILRatingCollectionView/pull/5.diff","patch_url":"https://github.com/IBM-MIL/MILRatingCollectionView/pull/5.patch","issue_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/5","number":5,"state":"open","locked":false,"title":"Refactor that includes support for old API as of latest commit","user":{"login":"ruslan120101","id":3612217,"avatar_url":"https://avatars.githubusercontent.com/u/3612217?v=3","gravatar_id":"","url":"https://api.github.com/users/ruslan120101","html_url":"https://github.com/ruslan120101","followers_url":"https://api.github.com/users/ruslan120101/followers","following_url":"https://api.github.com/users/ruslan120101/following{/other_user}","gists_url":"https://api.github.com/users/ruslan120101/gists{/gist_id}","starred_url":"https://api.github.com/users/ruslan120101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruslan120101/subscriptions","organizations_url":"https://api.github.com/users/ruslan120101/orgs","repos_url":"https://api.github.com/users/ruslan120101/repos","events_url":"https://api.github.com/users/ruslan120101/events{/privacy}","received_events_url":"https://api.github.com/users/ruslan120101/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-02T21:35:45Z","updated_at":"2015-07-13T03:15:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40de0811b4d991be6b75e2157b84ae6a49171bbb","assignee":{"login":"tfrank64","id":4023136,"avatar_url":"https://avatars.githubusercontent.com/u/4023136?v=3","gravatar_id":"","url":"https://api.github.com/users/tfrank64","html_url":"https://github.com/tfrank64","followers_url":"https://api.github.com/users/tfrank64/followers","following_url":"https://api.github.com/users/tfrank64/following{/other_user}","gists_url":"https://api.github.com/users/tfrank64/gists{/gist_id}","starred_url":"https://api.github.com/users/tfrank64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfrank64/subscriptions","organizations_url":"https://api.github.com/users/tfrank64/orgs","repos_url":"https://api.github.com/users/tfrank64/repos","events_url":"https://api.github.com/users/tfrank64/events{/privacy}","received_events_url":"https://api.github.com/users/tfrank64/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5/commits","review_comments_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5/comments","review_comment_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/5/comments","statuses_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/statuses/2401c68b9e4564268c9bd8636141a61481eb1190","head":{"label":"IBM-MIL:programmaticWithAnimation","ref":"programmaticWithAnimation","sha":"2401c68b9e4564268c9bd8636141a61481eb1190","user":{"login":"IBM-MIL","id":10927647,"avatar_url":"https://avatars.githubusercontent.com/u/10927647?v=3","gravatar_id":"","url":"https://api.github.com/users/IBM-MIL","html_url":"https://github.com/IBM-MIL","followers_url":"https://api.github.com/users/IBM-MIL/followers","following_url":"https://api.github.com/users/IBM-MIL/following{/other_user}","gists_url":"https://api.github.com/users/IBM-MIL/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-MIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-MIL/subscriptions","organizations_url":"https://api.github.com/users/IBM-MIL/orgs","repos_url":"https://api.github.com/users/IBM-MIL/repos","events_url":"https://api.github.com/users/IBM-MIL/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-MIL/received_events","type":"Organization","site_admin":false},"repo":{"id":31040560,"name":"MILRatingCollectionView","full_name":"IBM-MIL/MILRatingCollectionView","owner":{"login":"IBM-MIL","id":10927647,"avatar_url":"https://avatars.githubusercontent.com/u/10927647?v=3","gravatar_id":"","url":"https://api.github.com/users/IBM-MIL","html_url":"https://github.com/IBM-MIL","followers_url":"https://api.github.com/users/IBM-MIL/followers","following_url":"https://api.github.com/users/IBM-MIL/following{/other_user}","gists_url":"https://api.github.com/users/IBM-MIL/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-MIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-MIL/subscriptions","organizations_url":"https://api.github.com/users/IBM-MIL/orgs","repos_url":"https://api.github.com/users/IBM-MIL/repos","events_url":"https://api.github.com/users/IBM-MIL/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-MIL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBM-MIL/MILRatingCollectionView","description":" An easy to use, drop-in, reusable UI component built in Swift to display a horizontal number picker.","fork":false,"url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView","forks_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/forks","keys_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/teams","hooks_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/hooks","issue_events_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/events{/number}","events_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/events","assignees_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/assignees{/user}","branches_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/branches{/branch}","tags_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/tags","blobs_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/statuses/{sha}","languages_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/languages","stargazers_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/stargazers","contributors_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/contributors","subscribers_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/subscribers","subscription_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/subscription","commits_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/contents/{+path}","compare_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/merges","archive_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/downloads","issues_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues{/number}","pulls_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls{/number}","milestones_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/milestones{/number}","notifications_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/labels{/name}","releases_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/releases{/id}","created_at":"2015-02-19T22:34:30Z","updated_at":"2015-05-27T06:39:25Z","pushed_at":"2015-07-13T03:13:16Z","git_url":"git://github.com/IBM-MIL/MILRatingCollectionView.git","ssh_url":"git@github.com:IBM-MIL/MILRatingCollectionView.git","clone_url":"https://github.com/IBM-MIL/MILRatingCollectionView.git","svn_url":"https://github.com/IBM-MIL/MILRatingCollectionView","homepage":null,"size":2272,"stargazers_count":4,"watchers_count":4,"language":"Swift","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":4,"default_branch":"master"}},"base":{"label":"IBM-MIL:master","ref":"master","sha":"81b4a3a6db6a7e473383840cf0485192eabd13b6","user":{"login":"IBM-MIL","id":10927647,"avatar_url":"https://avatars.githubusercontent.com/u/10927647?v=3","gravatar_id":"","url":"https://api.github.com/users/IBM-MIL","html_url":"https://github.com/IBM-MIL","followers_url":"https://api.github.com/users/IBM-MIL/followers","following_url":"https://api.github.com/users/IBM-MIL/following{/other_user}","gists_url":"https://api.github.com/users/IBM-MIL/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-MIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-MIL/subscriptions","organizations_url":"https://api.github.com/users/IBM-MIL/orgs","repos_url":"https://api.github.com/users/IBM-MIL/repos","events_url":"https://api.github.com/users/IBM-MIL/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-MIL/received_events","type":"Organization","site_admin":false},"repo":{"id":31040560,"name":"MILRatingCollectionView","full_name":"IBM-MIL/MILRatingCollectionView","owner":{"login":"IBM-MIL","id":10927647,"avatar_url":"https://avatars.githubusercontent.com/u/10927647?v=3","gravatar_id":"","url":"https://api.github.com/users/IBM-MIL","html_url":"https://github.com/IBM-MIL","followers_url":"https://api.github.com/users/IBM-MIL/followers","following_url":"https://api.github.com/users/IBM-MIL/following{/other_user}","gists_url":"https://api.github.com/users/IBM-MIL/gists{/gist_id}","starred_url":"https://api.github.com/users/IBM-MIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IBM-MIL/subscriptions","organizations_url":"https://api.github.com/users/IBM-MIL/orgs","repos_url":"https://api.github.com/users/IBM-MIL/repos","events_url":"https://api.github.com/users/IBM-MIL/events{/privacy}","received_events_url":"https://api.github.com/users/IBM-MIL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IBM-MIL/MILRatingCollectionView","description":" An easy to use, drop-in, reusable UI component built in Swift to display a horizontal number picker.","fork":false,"url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView","forks_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/forks","keys_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/teams","hooks_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/hooks","issue_events_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/events{/number}","events_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/events","assignees_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/assignees{/user}","branches_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/branches{/branch}","tags_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/tags","blobs_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/refs{/sha}","trees_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/statuses/{sha}","languages_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/languages","stargazers_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/stargazers","contributors_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/contributors","subscribers_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/subscribers","subscription_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/subscription","commits_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/commits{/sha}","git_commits_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/git/commits{/sha}","comments_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/comments{/number}","issue_comment_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/comments{/number}","contents_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/contents/{+path}","compare_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/merges","archive_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/downloads","issues_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues{/number}","pulls_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls{/number}","milestones_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/milestones{/number}","notifications_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/labels{/name}","releases_url":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/releases{/id}","created_at":"2015-02-19T22:34:30Z","updated_at":"2015-05-27T06:39:25Z","pushed_at":"2015-07-13T03:13:16Z","git_url":"git://github.com/IBM-MIL/MILRatingCollectionView.git","ssh_url":"git@github.com:IBM-MIL/MILRatingCollectionView.git","clone_url":"https://github.com/IBM-MIL/MILRatingCollectionView.git","svn_url":"https://github.com/IBM-MIL/MILRatingCollectionView","homepage":null,"size":2272,"stargazers_count":4,"watchers_count":4,"language":"Swift","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":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5"},"html":{"href":"https://github.com/IBM-MIL/MILRatingCollectionView/pull/5"},"issue":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/5"},"comments":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/IBM-MIL/MILRatingCollectionView/statuses/2401c68b9e4564268c9bd8636141a61481eb1190"}}}}