Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CALayer Live Resize Poor Performance
- -(void)setFrameSize:(NSSize)newSize
- {
- if (inLiveResize) {
- NSRect scrollFrame = [[[self superview] enclosingScrollView] documentVisibleRect];
- BOOL condition1 = (self.frame.origin.y > (scrollFrame.origin.y - self.frame.size.height));
- BOOL condition2 = (self.frame.origin.y < (scrollFrame.origin.y + scrollFrame.size.height + self.frame.size.height));
- if (condition1 && condition2)
- [super setFrameSize:newSize];
- }
- else {
- [super setFrameSize:newSize]; }}
Advertisement
Add Comment
Please, Sign In to add comment