uibezierpath - How to get rounded corners only on bottom of the blurview with clear color on iOS? -


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.

  1. create cashapelayer.
  2. create uibezierpath specific corners , cornerradii.
  3. 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;   

enter image description here


Comments