So what I need to do is skewed UIViews (UIImageView, UIButton etc..).
I figured I need CAShapeLayer with CGPath. So far so good. Then I need to assign this to myView.layer.mask. Its ok too. But what if my UIView resizes? Do I need to recalc/remake the mask or is there some place I can put this to occur automatically?
I can't KVO with Categories (Objc) or extensions (Swift) since I can't globally modify dealloc method.
So I created a Swift subclass of UIView that will do the layer masking with
didSet
observer onbounds
. It servers as container for subview/s that are supposed to be skewed.