Reapply layer properties whenever -setLayer: is invoked too

This commit is contained in:
Justin Spahr-Summers 2012-11-25 23:38:48 -08:00
Родитель b9a06603b5
Коммит 4f61ad954a
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -180,6 +180,11 @@ static IMP RBLViewDrawRectIMP;
self.layer.opaque = self.opaque;
}
- (void)setLayer:(CALayer *)layer {
[super setLayer:layer];
[self applyLayerProperties];
}
// 10.8+ only.
- (void)updateLayer {
NSAssert(self.contents != nil, @"%@ does not have contents, %s should not be invoked", self, __func__);