{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react-native/pulls/comments/43237308","id":43237308,"diff_hunk":"@@ -30,6 +30,13 @@ - (UIView *)view\n \n static void RCTSendSliderEvent(RCTSlider *sender, BOOL continuous)\n {\n+  if (sender.step > 0 &&\n+    sender.step <= (sender.maximumValue - sender.minimumValue)) {\n+    int step = ((int)((sender.value + sender.step / 2) / sender.step) * sender.step);\n+    [sender setValue: step","path":"React/Views/RCTSliderManager.m","position":7,"original_position":7,"commit_id":"58272c3f945fa99d16a2f2d69cc2427f77af5349","original_commit_id":"3cb4eee266c1dd87614379577b236dd0b8eef2ab","user":{"login":"nicklockwood","id":546885,"avatar_url":"https://avatars.githubusercontent.com/u/546885?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklockwood","html_url":"https://github.com/nicklockwood","followers_url":"https://api.github.com/users/nicklockwood/followers","following_url":"https://api.github.com/users/nicklockwood/following{/other_user}","gists_url":"https://api.github.com/users/nicklockwood/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklockwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklockwood/subscriptions","organizations_url":"https://api.github.com/users/nicklockwood/orgs","repos_url":"https://api.github.com/users/nicklockwood/repos","events_url":"https://api.github.com/users/nicklockwood/events{/privacy}","received_events_url":"https://api.github.com/users/nicklockwood/received_events","type":"User","site_admin":false},"body":"I'm a little surprised that this works. Doesn't it prevent you from dragging the slider, since it would keep snapping back to the previous step?\r\n\r\nIf it does work, that's cool, but I'm a bit concerned that it's relying on an undocumented feature, and may break in a future iOS release.\r\n\r\nWould it possibly be safer to send the stepped value in the event callback, but only actually update the slider value when continuous = false (i.e. when the user has stopped dragging).","created_at":"2015-10-28T10:19:55Z","updated_at":"2015-10-28T10:19:55Z","html_url":"https://github.com/facebook/react-native/pull/3746#discussion_r43237308","pull_request_url":"https://api.github.com/repos/facebook/react-native/pulls/3746","_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments/43237308"},"html":{"href":"https://github.com/facebook/react-native/pull/3746#discussion_r43237308"},"pull_request":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3746"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/3746","id":48983864,"html_url":"https://github.com/facebook/react-native/pull/3746","diff_url":"https://github.com/facebook/react-native/pull/3746.diff","patch_url":"https://github.com/facebook/react-native/pull/3746.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/3746","number":3746,"state":"open","locked":false,"title":"Step support for SliderIOS","user":{"login":"asynxis","id":6160124,"avatar_url":"https://avatars.githubusercontent.com/u/6160124?v=3","gravatar_id":"","url":"https://api.github.com/users/asynxis","html_url":"https://github.com/asynxis","followers_url":"https://api.github.com/users/asynxis/followers","following_url":"https://api.github.com/users/asynxis/following{/other_user}","gists_url":"https://api.github.com/users/asynxis/gists{/gist_id}","starred_url":"https://api.github.com/users/asynxis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asynxis/subscriptions","organizations_url":"https://api.github.com/users/asynxis/orgs","repos_url":"https://api.github.com/users/asynxis/repos","events_url":"https://api.github.com/users/asynxis/events{/privacy}","received_events_url":"https://api.github.com/users/asynxis/received_events","type":"User","site_admin":false},"body":"Add step support to SliderIOS\r\n#3513 ","created_at":"2015-10-28T09:54:20Z","updated_at":"2015-10-28T10:19:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cddc59596c01e6ff6c89bcea839982cd930a8330","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/3746/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/3746/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/3746/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/58272c3f945fa99d16a2f2d69cc2427f77af5349","head":{"label":"asynxis:master","ref":"master","sha":"58272c3f945fa99d16a2f2d69cc2427f77af5349","user":{"login":"asynxis","id":6160124,"avatar_url":"https://avatars.githubusercontent.com/u/6160124?v=3","gravatar_id":"","url":"https://api.github.com/users/asynxis","html_url":"https://github.com/asynxis","followers_url":"https://api.github.com/users/asynxis/followers","following_url":"https://api.github.com/users/asynxis/following{/other_user}","gists_url":"https://api.github.com/users/asynxis/gists{/gist_id}","starred_url":"https://api.github.com/users/asynxis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asynxis/subscriptions","organizations_url":"https://api.github.com/users/asynxis/orgs","repos_url":"https://api.github.com/users/asynxis/repos","events_url":"https://api.github.com/users/asynxis/events{/privacy}","received_events_url":"https://api.github.com/users/asynxis/received_events","type":"User","site_admin":false},"repo":{"id":45101967,"name":"react-native","full_name":"asynxis/react-native","owner":{"login":"asynxis","id":6160124,"avatar_url":"https://avatars.githubusercontent.com/u/6160124?v=3","gravatar_id":"","url":"https://api.github.com/users/asynxis","html_url":"https://github.com/asynxis","followers_url":"https://api.github.com/users/asynxis/followers","following_url":"https://api.github.com/users/asynxis/following{/other_user}","gists_url":"https://api.github.com/users/asynxis/gists{/gist_id}","starred_url":"https://api.github.com/users/asynxis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asynxis/subscriptions","organizations_url":"https://api.github.com/users/asynxis/orgs","repos_url":"https://api.github.com/users/asynxis/repos","events_url":"https://api.github.com/users/asynxis/events{/privacy}","received_events_url":"https://api.github.com/users/asynxis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asynxis/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/asynxis/react-native","forks_url":"https://api.github.com/repos/asynxis/react-native/forks","keys_url":"https://api.github.com/repos/asynxis/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asynxis/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asynxis/react-native/teams","hooks_url":"https://api.github.com/repos/asynxis/react-native/hooks","issue_events_url":"https://api.github.com/repos/asynxis/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/asynxis/react-native/events","assignees_url":"https://api.github.com/repos/asynxis/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/asynxis/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/asynxis/react-native/tags","blobs_url":"https://api.github.com/repos/asynxis/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asynxis/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asynxis/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/asynxis/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asynxis/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/asynxis/react-native/languages","stargazers_url":"https://api.github.com/repos/asynxis/react-native/stargazers","contributors_url":"https://api.github.com/repos/asynxis/react-native/contributors","subscribers_url":"https://api.github.com/repos/asynxis/react-native/subscribers","subscription_url":"https://api.github.com/repos/asynxis/react-native/subscription","commits_url":"https://api.github.com/repos/asynxis/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/asynxis/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/asynxis/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/asynxis/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/asynxis/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/asynxis/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asynxis/react-native/merges","archive_url":"https://api.github.com/repos/asynxis/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asynxis/react-native/downloads","issues_url":"https://api.github.com/repos/asynxis/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/asynxis/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/asynxis/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/asynxis/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asynxis/react-native/labels{/name}","releases_url":"https://api.github.com/repos/asynxis/react-native/releases{/id}","created_at":"2015-10-28T09:28:21Z","updated_at":"2015-10-28T09:28:26Z","pushed_at":"2015-10-28T10:18:00Z","git_url":"git://github.com/asynxis/react-native.git","ssh_url":"git@github.com:asynxis/react-native.git","clone_url":"https://github.com/asynxis/react-native.git","svn_url":"https://github.com/asynxis/react-native","homepage":"http://facebook.github.io/react-native/","size":68459,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"46e67ef42892270ad3dcf792192009e048246f2a","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","created_at":"2015-01-09T18:10:16Z","updated_at":"2015-10-28T10:03:52Z","pushed_at":"2015-10-28T10:18:01Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":68459,"stargazers_count":21551,"watchers_count":21551,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3269,"mirror_url":null,"open_issues_count":841,"forks":3269,"open_issues":841,"watchers":21551,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3746"},"html":{"href":"https://github.com/facebook/react-native/pull/3746"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/3746"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/3746/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3746/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/3746/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/58272c3f945fa99d16a2f2d69cc2427f77af5349"}}}}