{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/352","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/352/comments","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/352/events","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/352","id":59879367,"number":352,"title":"Section UIEdgeInsets for ASCollectionView","user":{"login":"nivanchikov","id":1830010,"avatar_url":"https://avatars.githubusercontent.com/u/1830010?v=3","gravatar_id":"","url":"https://api.github.com/users/nivanchikov","html_url":"https://github.com/nivanchikov","followers_url":"https://api.github.com/users/nivanchikov/followers","following_url":"https://api.github.com/users/nivanchikov/following{/other_user}","gists_url":"https://api.github.com/users/nivanchikov/gists{/gist_id}","starred_url":"https://api.github.com/users/nivanchikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nivanchikov/subscriptions","organizations_url":"https://api.github.com/users/nivanchikov/orgs","repos_url":"https://api.github.com/users/nivanchikov/repos","events_url":"https://api.github.com/users/nivanchikov/events{/privacy}","received_events_url":"https://api.github.com/users/nivanchikov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-04T23:22:35Z","updated_at":"2015-03-07T22:46:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/352","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/352","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/352.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/352.patch"},"body":"`ASCollectionView` uses `self.bounds.size` when providing constrained size for its node cells.\r\n\r\nThis pull request adds support for section `UIEdgeInsets`, which can be returned in corresponding `UICollectionViewDelegateFlowLayout` method:\r\n\r\n```objc\r\n- (UIEdgeInsets) collectionView: (UICollectionView*) collectionView\r\n\t\t\t\t\t\t layout: (UICollectionViewLayout*) collectionViewLayout\r\n\t\t insetForSectionAtIndex: (NSInteger) section\r\n{\r\n\treturn UIEdgeInsetsMake(30.0f, 15.0f, 30.0f, 15.0f);\r\n}\r\n```\r\n\r\nAs a result the one of the constrained size dimensions for cell nodes will be reduced by sum of:\r\n- `bottom + top` for height when layout is horizontal\r\n- `left + right` for width when layout is vertical"},"comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments/77714792","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/352#issuecomment-77714792","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/352","id":77714792,"user":{"login":"secretiverhyme","id":735630,"avatar_url":"https://avatars.githubusercontent.com/u/735630?v=3","gravatar_id":"","url":"https://api.github.com/users/secretiverhyme","html_url":"https://github.com/secretiverhyme","followers_url":"https://api.github.com/users/secretiverhyme/followers","following_url":"https://api.github.com/users/secretiverhyme/following{/other_user}","gists_url":"https://api.github.com/users/secretiverhyme/gists{/gist_id}","starred_url":"https://api.github.com/users/secretiverhyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/secretiverhyme/subscriptions","organizations_url":"https://api.github.com/users/secretiverhyme/orgs","repos_url":"https://api.github.com/users/secretiverhyme/repos","events_url":"https://api.github.com/users/secretiverhyme/events{/privacy}","received_events_url":"https://api.github.com/users/secretiverhyme/received_events","type":"User","site_admin":false},"created_at":"2015-03-07T22:46:25Z","updated_at":"2015-03-07T22:46:25Z","body":"Nice, thanks for the pull request!  Can we update this to support `layout.sectionInset`, as @nguyenhuy describes?  Also, some quick Facebook code style nits:\r\n* curly braces for `if` statements\r\n* no whitespace after colons in messages\r\n* whitespace before pointers — `UICollectionView *`, not `UICollectionView*`"}}