{"action":"created","issue":{"url":"https://api.github.com/repos/jrturton/UIView-Autolayout/issues/34","labels_url":"https://api.github.com/repos/jrturton/UIView-Autolayout/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/jrturton/UIView-Autolayout/issues/34/comments","events_url":"https://api.github.com/repos/jrturton/UIView-Autolayout/issues/34/events","html_url":"https://github.com/jrturton/UIView-Autolayout/pull/34","id":60812641,"number":34,"title":"evenly distribute views","user":{"login":"dkk","id":576723,"avatar_url":"https://avatars.githubusercontent.com/u/576723?v=3","gravatar_id":"","url":"https://api.github.com/users/dkk","html_url":"https://github.com/dkk","followers_url":"https://api.github.com/users/dkk/followers","following_url":"https://api.github.com/users/dkk/following{/other_user}","gists_url":"https://api.github.com/users/dkk/gists{/gist_id}","starred_url":"https://api.github.com/users/dkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkk/subscriptions","organizations_url":"https://api.github.com/users/dkk/orgs","repos_url":"https://api.github.com/users/dkk/repos","events_url":"https://api.github.com/users/dkk/events{/privacy}","received_events_url":"https://api.github.com/users/dkk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-12T12:39:32Z","updated_at":"2015-03-12T13:52:36Z","closed_at":"2015-03-12T13:52:36Z","pull_request":{"url":"https://api.github.com/repos/jrturton/UIView-Autolayout/pulls/34","html_url":"https://github.com/jrturton/UIView-Autolayout/pull/34","diff_url":"https://github.com/jrturton/UIView-Autolayout/pull/34.diff","patch_url":"https://github.com/jrturton/UIView-Autolayout/pull/34.patch"},"body":"I created a new function spaceViews:onAxis:withMargin:, which lets you decide if you want margins or not. I also corrected spaceViews:onAxis:, since it was creating bigger margins at the sides (see http://stackoverflow.com/questions/28983492/space-evenly-across-a-view-without-margins).\r\n\r\nUnfortunately I had to use spacer views to accomplish it. I also tried without, but failed miserably (you can take a look at version 999a20e).\r\n\r\nFurther, the robot example was extended to show the new functionality and the screenshot has been updated."},"comment":{"url":"https://api.github.com/repos/jrturton/UIView-Autolayout/issues/comments/78482889","html_url":"https://github.com/jrturton/UIView-Autolayout/pull/34#issuecomment-78482889","issue_url":"https://api.github.com/repos/jrturton/UIView-Autolayout/issues/34","id":78482889,"user":{"login":"jrturton","id":2519784,"avatar_url":"https://avatars.githubusercontent.com/u/2519784?v=3","gravatar_id":"","url":"https://api.github.com/users/jrturton","html_url":"https://github.com/jrturton","followers_url":"https://api.github.com/users/jrturton/followers","following_url":"https://api.github.com/users/jrturton/following{/other_user}","gists_url":"https://api.github.com/users/jrturton/gists{/gist_id}","starred_url":"https://api.github.com/users/jrturton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrturton/subscriptions","organizations_url":"https://api.github.com/users/jrturton/orgs","repos_url":"https://api.github.com/users/jrturton/repos","events_url":"https://api.github.com/users/jrturton/events{/privacy}","received_events_url":"https://api.github.com/users/jrturton/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T13:52:35Z","updated_at":"2015-03-12T13:52:35Z","body":"I'm not going to merge this as it stands because:\r\n\r\n- There are no unit tests for the added functionality\r\n- I'm not crazy about spacer views being used if they're not necessary (the original method body should have been left as is)\r\n- The code formatting doesn't match the rest of the repo\r\n- You've used iOS8 only functionality (activateConstraints)\r\n- The robot's new arm doesn't look right in the image - it's right next to the body\r\n- You've left in some code which really shouldn't be there (setting the background colours to yellow for the spacer views??)\r\n\r\nThanks though. As for your original question you might have some luck with the container view approach, but pinning the outer edges of the first and last views to the main view, so the container \"hangs outside\" the main view - I hope that makes sense, I don't have a lot of time to look into this right now! "}}