зеркало из https://github.com/github/Rebel.git
Assert that the view has a window
This commit is contained in:
Родитель
2b96bd2683
Коммит
8c62a35df4
|
@ -11,6 +11,7 @@
|
|||
@implementation NSView (RBLAlignmentAdditions)
|
||||
|
||||
- (NSRect)rbl_viewBackingAlignedRect:(NSRect)rect options:(NSAlignmentOptions)options {
|
||||
NSAssert(self.window != nil, @"View must have a window in order to obtain a rectangle aligned to the backing.");
|
||||
NSRect windowRect = [self convertRect:rect toView:nil];
|
||||
NSRect windowBackingRect = [self backingAlignedRect:windowRect options:options];
|
||||
return [self convertRect:windowBackingRect fromView:nil];
|
||||
|
|
Загрузка…
Ссылка в новой задаче