{"action":"opened","issue":{"url":"https://api.github.com/repos/designatednerd/DNSCastroSegmentedControl/issues/5","labels_url":"https://api.github.com/repos/designatednerd/DNSCastroSegmentedControl/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/designatednerd/DNSCastroSegmentedControl/issues/5/comments","events_url":"https://api.github.com/repos/designatednerd/DNSCastroSegmentedControl/issues/5/events","html_url":"https://github.com/designatednerd/DNSCastroSegmentedControl/issues/5","id":83007264,"number":5,"title":"touchesMoved:withEvent: shouldn't call setSelectedSegmentIndex:animated:","user":{"login":"getaaron","id":789577,"avatar_url":"https://avatars.githubusercontent.com/u/789577?v=3","gravatar_id":"","url":"https://api.github.com/users/getaaron","html_url":"https://github.com/getaaron","followers_url":"https://api.github.com/users/getaaron/followers","following_url":"https://api.github.com/users/getaaron/following{/other_user}","gists_url":"https://api.github.com/users/getaaron/gists{/gist_id}","starred_url":"https://api.github.com/users/getaaron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getaaron/subscriptions","organizations_url":"https://api.github.com/users/getaaron/orgs","repos_url":"https://api.github.com/users/getaaron/repos","events_url":"https://api.github.com/users/getaaron/events{/privacy}","received_events_url":"https://api.github.com/users/getaaron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-31T05:24:25Z","updated_at":"2015-05-31T05:24:25Z","closed_at":null,"body":"The current implementation does this:\r\n\r\n```\r\n- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event\r\n{\r\n    // some stuff…\r\n    \r\n    [self setSelectedSegmentIndex:roundedSection animated:YES];\r\n}\r\n```\r\n\r\nI believe most users will consider it unexpected if an app's state changes while they're still dragging their finger. Normally, it's safe to drag controls around on the screen, and nothing will take effect until the finger is lifted. For example, in Settings, a user can drag the Airplane Mode switch right and left, and Airplane Mode won't enable unless they lift their finger while the switch is enabled.\r\n\r\nInstead, I believe this behavior should be in `touchesEnded:`, and `touchesCancelled:` should revert `selectionView` to its original state."}}