{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/componentkit/issues/298","labels_url":"https://api.github.com/repos/facebook/componentkit/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/facebook/componentkit/issues/298/comments","events_url":"https://api.github.com/repos/facebook/componentkit/issues/298/events","html_url":"https://github.com/facebook/componentkit/issues/298","id":94386201,"number":298,"title":"I am stuck with updating the model from inside a UIButton that is hosted by a [CKComponent newWithView]","user":{"login":"MohsenElgendy","id":5392357,"avatar_url":"https://avatars.githubusercontent.com/u/5392357?v=3","gravatar_id":"","url":"https://api.github.com/users/MohsenElgendy","html_url":"https://github.com/MohsenElgendy","followers_url":"https://api.github.com/users/MohsenElgendy/followers","following_url":"https://api.github.com/users/MohsenElgendy/following{/other_user}","gists_url":"https://api.github.com/users/MohsenElgendy/gists{/gist_id}","starred_url":"https://api.github.com/users/MohsenElgendy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MohsenElgendy/subscriptions","organizations_url":"https://api.github.com/users/MohsenElgendy/orgs","repos_url":"https://api.github.com/users/MohsenElgendy/repos","events_url":"https://api.github.com/users/MohsenElgendy/events{/privacy}","received_events_url":"https://api.github.com/users/MohsenElgendy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/componentkit/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-10T20:34:19Z","updated_at":"2015-07-10T20:46:21Z","closed_at":null,"body":"Hey,\r\n\r\nI have a UICollectionView that uses ComponentKit, I created the datasource and used CKArrayControllerInputItems without a problem and the componentForModel uses a model that subclasses a CKCompositeComponent and that component hosts other three components instagramAdTopBar, instagramAdImageAndDesc and InstagramAdBottomBar, the last component which the bottom bar has a like button, that button does an animation when you tab on it which required me to subclass the UIButton it self and use [CKComponent newWithView] my problem is that i change the UIButton image to another \"Active\" image when its tabbed and when i scroll over my collection view the other like buttons gets changed as well in the loop, which is not what i want. \r\n\r\nI think i am not doing it properly, I wanna know how to update the button with the new model state from inside the UIButton.\r\n\r\nSorry for explaining this deeply, I would appreciate it if you provide me a code example. i thought of sending the datasource along with the context but then again how ? because the datasource is not even set yet to be added to the context.\r\n\r\nAny help ?"},"comment":{"url":"https://api.github.com/repos/facebook/componentkit/issues/comments/120517998","html_url":"https://github.com/facebook/componentkit/issues/298#issuecomment-120517998","issue_url":"https://api.github.com/repos/facebook/componentkit/issues/298","id":120517998,"user":{"login":"ocrickard","id":857665,"avatar_url":"https://avatars.githubusercontent.com/u/857665?v=3","gravatar_id":"","url":"https://api.github.com/users/ocrickard","html_url":"https://github.com/ocrickard","followers_url":"https://api.github.com/users/ocrickard/followers","following_url":"https://api.github.com/users/ocrickard/following{/other_user}","gists_url":"https://api.github.com/users/ocrickard/gists{/gist_id}","starred_url":"https://api.github.com/users/ocrickard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocrickard/subscriptions","organizations_url":"https://api.github.com/users/ocrickard/orgs","repos_url":"https://api.github.com/users/ocrickard/repos","events_url":"https://api.github.com/users/ocrickard/events{/privacy}","received_events_url":"https://api.github.com/users/ocrickard/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T20:46:21Z","updated_at":"2015-07-10T20:46:21Z","body":"We really need code to be able to help here.  Please provide the pertinent snippets you're describing in your question."}}