зеркало из https://github.com/github/Rebel.git
Implement clipsToBounds on RBLView
This commit is contained in:
Родитель
65cdfe4454
Коммит
a0e5cc58ba
|
@ -15,6 +15,11 @@
|
|||
// The backing layer's background color, or nil if none has been set.
|
||||
@property (nonatomic, strong) NSColor *backgroundColor;
|
||||
|
||||
// Whether the view's content and subviews clip to its bounds.
|
||||
//
|
||||
// Defaults to NO.
|
||||
@property (nonatomic, assign) BOOL clipsToBounds;
|
||||
|
||||
// Whether the view's drawing completely fills its bounds with opaque content.
|
||||
//
|
||||
// Defaults to NO.
|
||||
|
|
|
@ -40,6 +40,14 @@ static IMP RBLViewDrawRectIMP;
|
|||
self.layer.backgroundColor = color.rbl_CGColor;
|
||||
}
|
||||
|
||||
- (BOOL)clipsToBounds {
|
||||
return self.layer.masksToBounds;
|
||||
}
|
||||
|
||||
- (void)setClipsToBounds:(BOOL)value {
|
||||
self.layer.masksToBounds = value;
|
||||
}
|
||||
|
||||
- (BOOL)isOpaque {
|
||||
return self.layer.opaque;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче