Skip to content

Commit

Permalink
Merge pull request twitter-archive#41 from joshaber/rootview-layer-fix
Browse files Browse the repository at this point in the history
Re-add the rootView's layer after the view's added to a window
  • Loading branch information
Loren Brichter committed Aug 10, 2011
2 parents 75e589d + 0ae3c4d commit bd0f9bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/UIKit/TUINSView.m
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ - (void)setRootView:(TUIView *)v
}
}

- (void)viewDidMoveToWindow
{
if(self.window != nil && rootView.layer.superlayer != [self layer]) {
[[self layer] addSublayer:rootView.layer];
}
}

- (TUIView *)viewForLocalPoint:(NSPoint)p
{
return [rootView hitTest:p withEvent:nil];
Expand Down

0 comments on commit bd0f9bc

Please sign in to comment.