Last active
December 11, 2015 20:59
-
-
Save indragiek/4659386 to your computer and use it in GitHub Desktop.
Fix for NSSplitView's non integral drawing/frame calculations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In an NSSplitView subclass | |
- (void)drawDividerInRect:(NSRect)rect | |
{ | |
[super drawDividerInRect:NSIntegralRect(rect)]; | |
} | |
// In NSSplitViewDelegate implementation | |
- (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)dividerIndex | |
{ | |
return floorf(proposedPosition); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment