{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/447","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/447/comments","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/447/events","html_url":"https://github.com/facebook/AsyncDisplayKit/issues/447","id":75126301,"number":447,"title":"Expose UIView like methods to know when a node moved in/removed from a superNode","user":{"login":"mohpor","id":4954588,"avatar_url":"https://avatars.githubusercontent.com/u/4954588?v=3","gravatar_id":"","url":"https://api.github.com/users/mohpor","html_url":"https://github.com/mohpor","followers_url":"https://api.github.com/users/mohpor/followers","following_url":"https://api.github.com/users/mohpor/following{/other_user}","gists_url":"https://api.github.com/users/mohpor/gists{/gist_id}","starred_url":"https://api.github.com/users/mohpor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohpor/subscriptions","organizations_url":"https://api.github.com/users/mohpor/orgs","repos_url":"https://api.github.com/users/mohpor/repos","events_url":"https://api.github.com/users/mohpor/events{/privacy}","received_events_url":"https://api.github.com/users/mohpor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-11T07:49:13Z","updated_at":"2015-05-17T23:47:44Z","closed_at":"2015-05-17T23:47:44Z","body":"I have been implementing a custom control using `ASTextNode` that needed to be in the center of its super node. I wanted to center it first when it got added to the super node but I guess there isn't any methods to override for that!\r\n\r\nIf I was going to accomplish the same thing using `UILabel`, I would've override `-(void)didMoveToSuperview;` and do what I wanted to do.\r\n\r\nAm I missing something? Isn't it a legit request?  is `- (void)willEnterHierarchy` a good start?"},"comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments/102871016","html_url":"https://github.com/facebook/AsyncDisplayKit/issues/447#issuecomment-102871016","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/447","id":102871016,"user":{"login":"appleguy","id":565251,"avatar_url":"https://avatars.githubusercontent.com/u/565251?v=3","gravatar_id":"","url":"https://api.github.com/users/appleguy","html_url":"https://github.com/appleguy","followers_url":"https://api.github.com/users/appleguy/followers","following_url":"https://api.github.com/users/appleguy/following{/other_user}","gists_url":"https://api.github.com/users/appleguy/gists{/gist_id}","starred_url":"https://api.github.com/users/appleguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleguy/subscriptions","organizations_url":"https://api.github.com/users/appleguy/orgs","repos_url":"https://api.github.com/users/appleguy/repos","events_url":"https://api.github.com/users/appleguy/events{/privacy}","received_events_url":"https://api.github.com/users/appleguy/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T23:47:44Z","updated_at":"2015-05-17T23:47:44Z","body":"When something is added to the hierarchy, it may be the case that its supernode is not properly sized / positioned.  Is there any reason not to do the positioning in -layout?\r\n\r\nThat said, -willEnterHierarchy is a great way to do this.  If you wanted to do this yourself, remember that CALayer does not offer a direct equivalent to the UIView notifications.  AsyncDisplayKit automatically bridges this for you, but the behavior is not identical between view and layer-backed nodes.  It should work as you intend for nearly all cases, though.\r\n\r\nPlease let me know if you have any further questions, either by re-opening this task or a new one (or posting in one of our discussion groups).  Thanks @mohpor!"}}