{"action":"created","issue":{"url":"https://api.github.com/repos/thomasfinch/GammaThingy/issues/41","labels_url":"https://api.github.com/repos/thomasfinch/GammaThingy/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/thomasfinch/GammaThingy/issues/41/comments","events_url":"https://api.github.com/repos/thomasfinch/GammaThingy/issues/41/events","html_url":"https://github.com/thomasfinch/GammaThingy/issues/41","id":112313283,"number":41,"title":"Transition animation","user":{"login":"ANGOmarcello","id":6996312,"avatar_url":"https://avatars.githubusercontent.com/u/6996312?v=3","gravatar_id":"","url":"https://api.github.com/users/ANGOmarcello","html_url":"https://github.com/ANGOmarcello","followers_url":"https://api.github.com/users/ANGOmarcello/followers","following_url":"https://api.github.com/users/ANGOmarcello/following{/other_user}","gists_url":"https://api.github.com/users/ANGOmarcello/gists{/gist_id}","starred_url":"https://api.github.com/users/ANGOmarcello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ANGOmarcello/subscriptions","organizations_url":"https://api.github.com/users/ANGOmarcello/orgs","repos_url":"https://api.github.com/users/ANGOmarcello/repos","events_url":"https://api.github.com/users/ANGOmarcello/events{/privacy}","received_events_url":"https://api.github.com/users/ANGOmarcello/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-20T08:28:22Z","updated_at":"2015-10-27T18:01:46Z","closed_at":null,"body":"Hey folks what do you think about this?\r\nI worked on a little method to transition between gamma values.\r\n\r\n```objc\r\n// This method creates a transistion from one gamma value to another\r\n+ (void)setGammaWithTransitionFrom:(float)oldPercentOrange to:(float)newPercentOrange {\r\n\r\n    float delay = 0.02; // The animation delay\r\n    \r\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\r\n        if (newPercentOrange > oldPercentOrange) {\r\n            for (float i = oldPercentOrange; i <= newPercentOrange; i = i + 0.01) {\r\n                [NSThread sleepForTimeInterval:delay];\r\n                [self setGammaWithOrangeness:i];\r\n                NSLog(@\"%f\",i);\r\n            }\r\n        } else {\r\n            for (float i = oldPercentOrange; i >= newPercentOrange; i = i - 0.01) {\r\n                [NSThread sleepForTimeInterval:delay];\r\n                [self setGammaWithOrangeness:i];\r\n                NSLog(@\"%f\",i);\r\n            }\r\n        }\r\n    });\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/thomasfinch/GammaThingy/issues/comments/151588573","html_url":"https://github.com/thomasfinch/GammaThingy/issues/41#issuecomment-151588573","issue_url":"https://api.github.com/repos/thomasfinch/GammaThingy/issues/41","id":151588573,"user":{"login":"arthurhammer","id":4521216,"avatar_url":"https://avatars.githubusercontent.com/u/4521216?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurhammer","html_url":"https://github.com/arthurhammer","followers_url":"https://api.github.com/users/arthurhammer/followers","following_url":"https://api.github.com/users/arthurhammer/following{/other_user}","gists_url":"https://api.github.com/users/arthurhammer/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurhammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurhammer/subscriptions","organizations_url":"https://api.github.com/users/arthurhammer/orgs","repos_url":"https://api.github.com/users/arthurhammer/repos","events_url":"https://api.github.com/users/arthurhammer/events{/privacy}","received_events_url":"https://api.github.com/users/arthurhammer/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T18:01:46Z","updated_at":"2015-10-27T18:01:46Z","body":"I'm currently playing with a Today Widget and this is indeed an issue there. The widget has an enable/disable toggle, an increase (orangeness) and a decrease button. When you hit \"enable\" but do \"increase/decrease\" before the transition is finished, it flickers badly and it ends in an inconsistent state at the end. It's not that bad in the main app, but in the widget it's very noticeable."}}