
使用 Masonry 定了一 UIImageView 上的 Constraints。
想在 imageView 上加一 CAGradientLayer,但是 CALayer 是不支持 Masonry 的。
除了在 - (void)viewDidLayoutSubviews 中更改 CALayer 的 frame,有什比好的方法定 CALayer 的 frame 的方式?
1 mudkip 2015-08-11 00:44:05 +08:00 我一般是重载 UIImageView 然后在 - layoutSublayersOfLayer: 中改变 layer 的 frame... |