{"action":"created","issue":{"url":"https://api.github.com/repos/lourenco-marinho/ActionButton/issues/1","labels_url":"https://api.github.com/repos/lourenco-marinho/ActionButton/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/lourenco-marinho/ActionButton/issues/1/comments","events_url":"https://api.github.com/repos/lourenco-marinho/ActionButton/issues/1/events","html_url":"https://github.com/lourenco-marinho/ActionButton/issues/1","id":89255324,"number":1,"title":"When using the code in Objective C Project, it crashes","user":{"login":"RajChanchal","id":7058465,"avatar_url":"https://avatars.githubusercontent.com/u/7058465?v=3","gravatar_id":"","url":"https://api.github.com/users/RajChanchal","html_url":"https://github.com/RajChanchal","followers_url":"https://api.github.com/users/RajChanchal/followers","following_url":"https://api.github.com/users/RajChanchal/following{/other_user}","gists_url":"https://api.github.com/users/RajChanchal/gists{/gist_id}","starred_url":"https://api.github.com/users/RajChanchal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RajChanchal/subscriptions","organizations_url":"https://api.github.com/users/RajChanchal/orgs","repos_url":"https://api.github.com/users/RajChanchal/repos","events_url":"https://api.github.com/users/RajChanchal/events{/privacy}","received_events_url":"https://api.github.com/users/RajChanchal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-18T10:25:21Z","updated_at":"2015-06-19T09:44:12Z","closed_at":null,"body":"When using the code in Objective-C project, it crashes on line number 50: self.parentView = view of ActionButton.swift class. This is how I have implemented:\r\nActionButtonItem *item = [[ActionButtonItem alloc]initWithTitle:@\"New Task\" image:nil];\r\nActionButtonItem *item2 = [[ActionButtonItem alloc]initWithTitle:@\"New Event\" image:nil]; ActionButtonItem *item3 = [[ActionButtonItem alloc]initWithTitle:@\"New Project\" image:nil];\r\nActionButton *actionButton = [[ActionButton alloc]initWithAttachedToView:self.view items:@[item,item2,item3]];"},"comment":{"url":"https://api.github.com/repos/lourenco-marinho/ActionButton/issues/comments/113448317","html_url":"https://github.com/lourenco-marinho/ActionButton/issues/1#issuecomment-113448317","issue_url":"https://api.github.com/repos/lourenco-marinho/ActionButton/issues/1","id":113448317,"user":{"login":"RajChanchal","id":7058465,"avatar_url":"https://avatars.githubusercontent.com/u/7058465?v=3","gravatar_id":"","url":"https://api.github.com/users/RajChanchal","html_url":"https://github.com/RajChanchal","followers_url":"https://api.github.com/users/RajChanchal/followers","following_url":"https://api.github.com/users/RajChanchal/following{/other_user}","gists_url":"https://api.github.com/users/RajChanchal/gists{/gist_id}","starred_url":"https://api.github.com/users/RajChanchal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RajChanchal/subscriptions","organizations_url":"https://api.github.com/users/RajChanchal/orgs","repos_url":"https://api.github.com/users/RajChanchal/repos","events_url":"https://api.github.com/users/RajChanchal/events{/privacy}","received_events_url":"https://api.github.com/users/RajChanchal/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T09:44:12Z","updated_at":"2015-06-19T09:44:12Z","body":"And how can this line be converted to Objective-C:\r\nactionButton.action = { button in button.toggleMenu() "}}