{"action":"created","issue":{"url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/issues/530","repository_url":"https://api.github.com/repos/SwifterSwift/SwifterSwift","labels_url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/issues/530/comments","events_url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/issues/530/events","html_url":"https://github.com/SwifterSwift/SwifterSwift/pull/530","id":345539009,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjQ3MjQy","number":530,"title":"Provide syntactic sugar for working with ChildViewControllers","user":{"login":"marcocapano","id":23129028,"node_id":"MDQ6VXNlcjIzMTI5MDI4","avatar_url":"https://avatars3.githubusercontent.com/u/23129028?v=4","gravatar_id":"","url":"https://api.github.com/users/marcocapano","html_url":"https://github.com/marcocapano","followers_url":"https://api.github.com/users/marcocapano/followers","following_url":"https://api.github.com/users/marcocapano/following{/other_user}","gists_url":"https://api.github.com/users/marcocapano/gists{/gist_id}","starred_url":"https://api.github.com/users/marcocapano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcocapano/subscriptions","organizations_url":"https://api.github.com/users/marcocapano/orgs","repos_url":"https://api.github.com/users/marcocapano/repos","events_url":"https://api.github.com/users/marcocapano/events{/privacy}","received_events_url":"https://api.github.com/users/marcocapano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-29T15:22:51Z","updated_at":"2018-07-30T07:14:42Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/pulls/530","html_url":"https://github.com/SwifterSwift/SwifterSwift/pull/530","diff_url":"https://github.com/SwifterSwift/SwifterSwift/pull/530.diff","patch_url":"https://github.com/SwifterSwift/SwifterSwift/pull/530.patch"},"body":"This requests adds two methods to quickly add and remove childviewcontrollers.\r\n## Checklist\r\n<!--- Please go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I checked the [**Contributing Guidelines**](https://github.com/SwifterSwift/SwifterSwift/blob/master/CONTRIBUTING.md) before creating this request.\r\n- [x] New extensions are written in Swift 4.\r\n- [x] New extensions support iOS 8.0+ / tvOS 9.0+ / macOS 10.10+ / watchOS 2.0+.\r\n- [x] I have added tests for new extensions, and they passed.\r\n- [x] All extensions have a **clear** comments explaining their functionality, all parameters and return type in English.\r\n- [x] All extensions are declared as **public**.\r\n- [x] I have added a [changelog](https://github.com/SwifterSwift/SwifterSwift/blob/master/CHANGELOG_GUIDELINES.md) entry describing my changes.\r\n🚀 🚀 🚀 \r\n"},"comment":{"url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/issues/comments/408769105","html_url":"https://github.com/SwifterSwift/SwifterSwift/pull/530#issuecomment-408769105","issue_url":"https://api.github.com/repos/SwifterSwift/SwifterSwift/issues/530","id":408769105,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODc2OTEwNQ==","user":{"login":"guykogus","id":924764,"node_id":"MDQ6VXNlcjkyNDc2NA==","avatar_url":"https://avatars2.githubusercontent.com/u/924764?v=4","gravatar_id":"","url":"https://api.github.com/users/guykogus","html_url":"https://github.com/guykogus","followers_url":"https://api.github.com/users/guykogus/followers","following_url":"https://api.github.com/users/guykogus/following{/other_user}","gists_url":"https://api.github.com/users/guykogus/gists{/gist_id}","starred_url":"https://api.github.com/users/guykogus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guykogus/subscriptions","organizations_url":"https://api.github.com/users/guykogus/orgs","repos_url":"https://api.github.com/users/guykogus/repos","events_url":"https://api.github.com/users/guykogus/events{/privacy}","received_events_url":"https://api.github.com/users/guykogus/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T07:14:42Z","updated_at":"2018-07-30T07:14:42Z","author_association":"CONTRIBUTOR","body":"Regarding the naming, I have these methods in my own project named like this:\r\n\r\n```Swift\r\nextension UIViewController {\r\n    func addChildViewController(_ childViewController: UIViewController, toContainerView: UIView) {\r\n        addChildViewController(childViewController)\r\n        let childView = childViewController.view!\r\n        toContainerView.addSubview(childView)\r\n        childView.matchSuperview()\r\n        childViewController.didMove(toParentViewController: self)\r\n    }\r\n\r\n    func removeViewFromParentViewController() {\r\n        willMove(toParentViewController: nil)\r\n        view.removeFromSuperview()\r\n        removeFromParentViewController()\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"guykogus"}}