{"action":"created","issue":{"url":"https://api.github.com/repos/linkedin/LayoutKit/issues/54","repository_url":"https://api.github.com/repos/linkedin/LayoutKit","labels_url":"https://api.github.com/repos/linkedin/LayoutKit/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/linkedin/LayoutKit/issues/54/comments","events_url":"https://api.github.com/repos/linkedin/LayoutKit/issues/54/events","html_url":"https://github.com/linkedin/LayoutKit/issues/54","id":182919417,"number":54,"title":"UIButton Layout","user":{"login":"pgherveou","id":521091,"avatar_url":"https://avatars.githubusercontent.com/u/521091?v=3","gravatar_id":"","url":"https://api.github.com/users/pgherveou","html_url":"https://github.com/pgherveou","followers_url":"https://api.github.com/users/pgherveou/followers","following_url":"https://api.github.com/users/pgherveou/following{/other_user}","gists_url":"https://api.github.com/users/pgherveou/gists{/gist_id}","starred_url":"https://api.github.com/users/pgherveou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgherveou/subscriptions","organizations_url":"https://api.github.com/users/pgherveou/orgs","repos_url":"https://api.github.com/users/pgherveou/repos","events_url":"https://api.github.com/users/pgherveou/events{/privacy}","received_events_url":"https://api.github.com/users/pgherveou/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/linkedin/LayoutKit/labels/enhancement","name":"enhancement","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-13T22:25:54Z","updated_at":"2016-10-15T14:58:42Z","closed_at":null,"body":"Hey there \r\nIs there something equivalent to LabelLayout for views such as UIButton (or any other view that define an intrinsicContentSize)?\r\n\r\nRight now I am using a SizeLayout but I am forced to define the size of my button\r\n\r\n```swift\r\nSizeLayout<UIButton>(\r\n  width: 100, height: 50,\r\n  alignment: .centerTrailing,\r\n  flexibility: .flexible,\r\n  config: { button in\r\n    button.backgroundColor = UIColor.blue\r\n    button.setTitle(\"Button\", for: .normal)\r\n    button.setTitleColor(.black, for: .normal)\r\n  }\r\n)\r\n```\r\n<img width=\"406\" alt=\"screen shot 2016-10-13 at 3 19 47 pm\" src=\"https://cloud.githubusercontent.com/assets/521091/19369220/fae71496-9158-11e6-958d-27509873d465.png\">"},"comment":{"url":"https://api.github.com/repos/linkedin/LayoutKit/issues/comments/253989234","html_url":"https://github.com/linkedin/LayoutKit/issues/54#issuecomment-253989234","issue_url":"https://api.github.com/repos/linkedin/LayoutKit/issues/54","id":253989234,"user":{"login":"pgherveou","id":521091,"avatar_url":"https://avatars.githubusercontent.com/u/521091?v=3","gravatar_id":"","url":"https://api.github.com/users/pgherveou","html_url":"https://github.com/pgherveou","followers_url":"https://api.github.com/users/pgherveou/followers","following_url":"https://api.github.com/users/pgherveou/following{/other_user}","gists_url":"https://api.github.com/users/pgherveou/gists{/gist_id}","starred_url":"https://api.github.com/users/pgherveou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgherveou/subscriptions","organizations_url":"https://api.github.com/users/pgherveou/orgs","repos_url":"https://api.github.com/users/pgherveou/repos","events_url":"https://api.github.com/users/pgherveou/events{/privacy}","received_events_url":"https://api.github.com/users/pgherveou/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T14:58:42Z","updated_at":"2016-10-15T14:58:42Z","body":"Thks @esam091 for the link. \r\nMy Point is,  why dont we reuse `sizeThatFits` rather than trying to reimplement it\r\nWhat are the disadvantage of the method I described above? \r\ncc @nicksnyder\r\n\r\n"}}
{"actor":{"display_login":"pgherveou"}}