{"action":"created","issue":{"url":"https://api.github.com/repos/SnapKit/SnapKit/issues/85","labels_url":"https://api.github.com/repos/SnapKit/SnapKit/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/SnapKit/SnapKit/issues/85/comments","events_url":"https://api.github.com/repos/SnapKit/SnapKit/issues/85/events","html_url":"https://github.com/SnapKit/SnapKit/issues/85","id":71913355,"number":85,"title":"How can I set a horizontal Space Constraint?","user":{"login":"steffimueller","id":5350431,"avatar_url":"https://avatars.githubusercontent.com/u/5350431?v=3","gravatar_id":"","url":"https://api.github.com/users/steffimueller","html_url":"https://github.com/steffimueller","followers_url":"https://api.github.com/users/steffimueller/followers","following_url":"https://api.github.com/users/steffimueller/following{/other_user}","gists_url":"https://api.github.com/users/steffimueller/gists{/gist_id}","starred_url":"https://api.github.com/users/steffimueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steffimueller/subscriptions","organizations_url":"https://api.github.com/users/steffimueller/orgs","repos_url":"https://api.github.com/users/steffimueller/repos","events_url":"https://api.github.com/users/steffimueller/events{/privacy}","received_events_url":"https://api.github.com/users/steffimueller/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-29T15:50:13Z","updated_at":"2015-05-01T12:22:53Z","closed_at":"2015-04-30T11:20:08Z","body":"I want to use SnapKit to create the same constraint as the following image shows:\r\n\r\n![main_storyboard_ _edited](https://cloud.githubusercontent.com/assets/5350431/7395002/827162d8-ee97-11e4-99c2-a2c5c4d7bf06.png)\r\n\r\nIs this the correct way of doing it?\r\n\r\n```\r\nbox.snp_makeConstraints { (make) -> Void in\r\n      make.leading.equalTo(superView.snp_leadingMargin)\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/SnapKit/SnapKit/issues/comments/98122199","html_url":"https://github.com/SnapKit/SnapKit/issues/85#issuecomment-98122199","issue_url":"https://api.github.com/repos/SnapKit/SnapKit/issues/85","id":98122199,"user":{"login":"robertjpayne","id":214288,"avatar_url":"https://avatars.githubusercontent.com/u/214288?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjpayne","html_url":"https://github.com/robertjpayne","followers_url":"https://api.github.com/users/robertjpayne/followers","following_url":"https://api.github.com/users/robertjpayne/following{/other_user}","gists_url":"https://api.github.com/users/robertjpayne/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjpayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjpayne/subscriptions","organizations_url":"https://api.github.com/users/robertjpayne/orgs","repos_url":"https://api.github.com/users/robertjpayne/repos","events_url":"https://api.github.com/users/robertjpayne/events{/privacy}","received_events_url":"https://api.github.com/users/robertjpayne/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T12:22:53Z","updated_at":"2015-05-01T12:22:53Z","body":"@steffimueller this is entirely intentional `insets(...)` act like UIEdgeInsetsInsetRect or CGRectInset.\r\n\r\nWhile it may seem counterintuitive you for right / bottom edges I think it would be even weirder if we tried to apply random heuristics. You can think of the DSL as always doing:\r\n\r\n<leftAttribute> <relation> <rightAttribute> + <offset>\r\n\r\ninsets is simply a shortcut that sets inverts the offset to make it \"inset\"."}}