{"action":"created","issue":{"url":"https://api.github.com/repos/uber/RIBs/issues/140","repository_url":"https://api.github.com/repos/uber/RIBs","labels_url":"https://api.github.com/repos/uber/RIBs/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/uber/RIBs/issues/140/comments","events_url":"https://api.github.com/repos/uber/RIBs/issues/140/events","html_url":"https://github.com/uber/RIBs/issues/140","id":274133029,"number":140,"title":"Detaching Child","user":{"login":"igordeoliveirasa","id":2123428,"avatar_url":"https://avatars0.githubusercontent.com/u/2123428?v=4","gravatar_id":"","url":"https://api.github.com/users/igordeoliveirasa","html_url":"https://github.com/igordeoliveirasa","followers_url":"https://api.github.com/users/igordeoliveirasa/followers","following_url":"https://api.github.com/users/igordeoliveirasa/following{/other_user}","gists_url":"https://api.github.com/users/igordeoliveirasa/gists{/gist_id}","starred_url":"https://api.github.com/users/igordeoliveirasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igordeoliveirasa/subscriptions","organizations_url":"https://api.github.com/users/igordeoliveirasa/orgs","repos_url":"https://api.github.com/users/igordeoliveirasa/repos","events_url":"https://api.github.com/users/igordeoliveirasa/events{/privacy}","received_events_url":"https://api.github.com/users/igordeoliveirasa/received_events","type":"User","site_admin":false},"labels":[{"id":709765765,"url":"https://api.github.com/repos/uber/RIBs/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-11-15T12:05:47Z","updated_at":"2018-03-11T02:35:19Z","closed_at":"2018-03-11T02:35:19Z","author_association":"NONE","body":"In tutorial we learn the below code so as to detach current child:\r\n\r\n```swift\r\nprivate func detachCurrentChild() {\r\n        if let currentChild = currentChild as? ViewableRouting {\r\n            detachChild(currentChild)\r\n            viewController.dismiss(viewController: currentChild.viewControllable)\r\n        }\r\n    }\r\n```\r\n\r\nA question: May I also use that method so as to detach children from RIBs which doesn't own View? If no, how could detach them? I suppose, the right method should be like that, Am I right? Follows:\r\n\r\n```swift\r\nprivate func detachCurrentChild() {\r\n        if currentChild != nil {\r\n            detachChild(currentChild!)\r\n        }\r\n        \r\n        if let currentChild = currentChild as? ViewableRouting {\r\n            viewController.dismiss(viewController: currentChild.viewControllable)\r\n        }\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/uber/RIBs/issues/comments/372084415","html_url":"https://github.com/uber/RIBs/issues/140#issuecomment-372084415","issue_url":"https://api.github.com/repos/uber/RIBs/issues/140","id":372084415,"user":{"login":"artman","id":263457,"avatar_url":"https://avatars3.githubusercontent.com/u/263457?v=4","gravatar_id":"","url":"https://api.github.com/users/artman","html_url":"https://github.com/artman","followers_url":"https://api.github.com/users/artman/followers","following_url":"https://api.github.com/users/artman/following{/other_user}","gists_url":"https://api.github.com/users/artman/gists{/gist_id}","starred_url":"https://api.github.com/users/artman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artman/subscriptions","organizations_url":"https://api.github.com/users/artman/orgs","repos_url":"https://api.github.com/users/artman/repos","events_url":"https://api.github.com/users/artman/events{/privacy}","received_events_url":"https://api.github.com/users/artman/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T02:35:19Z","updated_at":"2018-03-11T02:35:19Z","author_association":"MEMBER","body":"Closing as stale."}}
{"actor":{"display_login":"artman"}}