{"action":"created","issue":{"url":"https://api.github.com/repos/lexrus/LTMorphingLabel/issues/19","labels_url":"https://api.github.com/repos/lexrus/LTMorphingLabel/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/lexrus/LTMorphingLabel/issues/19/comments","events_url":"https://api.github.com/repos/lexrus/LTMorphingLabel/issues/19/events","html_url":"https://github.com/lexrus/LTMorphingLabel/pull/19","id":53046989,"number":19,"title":"Prevents a crash when embedding label in a designable view","user":{"login":"afdreher","id":2915410,"avatar_url":"https://avatars.githubusercontent.com/u/2915410?v=3","gravatar_id":"","url":"https://api.github.com/users/afdreher","html_url":"https://github.com/afdreher","followers_url":"https://api.github.com/users/afdreher/followers","following_url":"https://api.github.com/users/afdreher/following{/other_user}","gists_url":"https://api.github.com/users/afdreher/gists{/gist_id}","starred_url":"https://api.github.com/users/afdreher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afdreher/subscriptions","organizations_url":"https://api.github.com/users/afdreher/orgs","repos_url":"https://api.github.com/users/afdreher/repos","events_url":"https://api.github.com/users/afdreher/events{/privacy}","received_events_url":"https://api.github.com/users/afdreher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-12-29T15:12:30Z","updated_at":"2015-01-08T14:16:56Z","closed_at":"2014-12-29T15:34:31Z","pull_request":{"url":"https://api.github.com/repos/lexrus/LTMorphingLabel/pulls/19","html_url":"https://github.com/lexrus/LTMorphingLabel/pull/19","diff_url":"https://github.com/lexrus/LTMorphingLabel/pull/19.diff","patch_url":"https://github.com/lexrus/LTMorphingLabel/pull/19.patch"},"body":"I really like the label, but it keeps crashing the IBDesignables agent when it is programmatically embed it inside an IBDesignable view.  The problem is that the IBDesignables agent can't instantiate a display link object to animate the change from empty to whatever other text one provides.  Here, I've made 3 changes to get the label to work:\r\n\r\n1) Added the designable tag to the class\r\n2) Made the animation conditional on the target not being the IB agent.  This prevents the above issue with the display link.\r\n3) Forced the _originText to the new value for the IB agent.  This is necessary to get the label to draw the characters correctly. If the value isn't set, then without the animation, the label will be blank (it's previous value).\r\n\r\nI think this is the minimal change required to get the designables behavior, but it might not be the cleanest."},"comment":{"url":"https://api.github.com/repos/lexrus/LTMorphingLabel/issues/comments/69184125","html_url":"https://github.com/lexrus/LTMorphingLabel/pull/19#issuecomment-69184125","issue_url":"https://api.github.com/repos/lexrus/LTMorphingLabel/issues/19","id":69184125,"user":{"login":"afdreher","id":2915410,"avatar_url":"https://avatars.githubusercontent.com/u/2915410?v=3","gravatar_id":"","url":"https://api.github.com/users/afdreher","html_url":"https://github.com/afdreher","followers_url":"https://api.github.com/users/afdreher/followers","following_url":"https://api.github.com/users/afdreher/following{/other_user}","gists_url":"https://api.github.com/users/afdreher/gists{/gist_id}","starred_url":"https://api.github.com/users/afdreher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afdreher/subscriptions","organizations_url":"https://api.github.com/users/afdreher/orgs","repos_url":"https://api.github.com/users/afdreher/repos","events_url":"https://api.github.com/users/afdreher/events{/privacy}","received_events_url":"https://api.github.com/users/afdreher/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T14:16:56Z","updated_at":"2015-01-08T14:16:56Z","body":"With a little more digging, I think it might be related to this issue: http://stackoverflow.com/questions/26030951/ibdesignable-errors-when-adding-to-tests-target\r\n\r\nIt seems that it's more of an access control / permissions issue.  I'll see if I can resolve it."}}