Thursday, 15 March 2012

ios - UIView layer not masking correctly -


I would like to create a UIView that has rounded the corner on the upper and upper right sides.

To do this, I want to mask uivuv with a cash player.

I'm using this ICO: BezierPathWithRoundedRect: self.menuContainerView.bounds Sort by: UIRectCornerTopLeft | UIRectCornerTopRight Conrad: CGSizeMake (20.0, 20.0)]; CashPlayer * Masclesser = [[Caspelier Alok] Init]; Masklayer.frame = self.menuContainerView.bounds; MaskLayer.path = Mask Path. CGP; Self.menuContainerView.layer.mask = Mask Layer;

However, when I run this code, it seems that the mask has no effect. Why not consider any?

What I did not mention in my reply is that I was also installing it Masklayer for another view (an offscreen) in the form of a mask. Apparently you can not do this .... I removed that extra line

  self.otherContainerView.layer.mask = MaskLayer;   

And it worked as desired.

No comments:

Post a Comment