i'm placing blurview in uitableviewcell. cell's background color set clear color. want specific corners rounded well.
i came across this solution getting rounded corners.
- create cashapelayer.
- create uibezierpath specific corners , cornerradii.
- apply cashapelayer , add mask of target view's layer.
but works when view has background color. want specific corners rounded clear color.
thanks in advance.
try this
uibezierpath *maskpath = [uibezierpath bezierpathwithroundedrect:self.viewoutlet.bounds byroundingcorners:(uirectcornertopleft | uirectcornerbottomleft | uirectcornerbottomright) cornerradii:cgsizemake(10.0, 10.0)]; cashapelayer *masklayer = [[cashapelayer alloc] init]; masklayer.frame = self.view.bounds; masklayer.path = maskpath.cgpath; self.viewoutlet.layer.mask = masklayer;
Comments
Post a Comment