objective c - Round only 2 corners of a UIView in custom UITableViewCell - iOS -


i have uiview in custom uitableviewcell , want round bottom left , right corners of view. i'm doing following, it's not working:

- (void)awakefromnib {     // initialization code      cashapelayer * masklayer = [cashapelayer layer];     masklayer.path = [uibezierpath bezierpathwithroundedrect: _viewfortags.bounds byroundingcorners: uirectcornerbottomleft | uirectcornerbottomright cornerradii: (cgsize){7.0, 7.0}].cgpath;      _viewfortags.layer.mask = masklayer; } 

i achieve in usual view controllers in viewwilllayoutsubviews method , works perfectly, there's no such method when subclass uitableviewcell.

any idea how can round 2 corners of view in subclassed uitableviewcell?

actually there method state in uitableviewcell. layoutsubviews

-(void)layoutsubviews {     cashapelayer * masklayer = [cashapelayer layer];     masklayer.path = [uibezierpath bezierpathwithroundedrect: _im.bounds byroundingcorners: uirectcornerbottomleft | uirectcornerbottomright cornerradii: (cgsize){7.0, 7.0}].cgpath;      _im.layer.mask = masklayer; } 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -