ios - Why setClipsToBounds:NO disables setCornerRadius: for UItableview? -
i'm creating uiitableview. first cell want have user image button allow him change image. (not complicated). somehow have strange problem: when set setmaskstobounds:no [self.usertable.layer setcornerradius:20.0]; disabled. attaching code output example:
//initiate usertable //[self.usertable setclipstobounds:no];//from documentation line set default [self.usertable.layer setcornerradius:20.0]; [self.view addsubview:self.usertable]; later in cellforrowatindexpath: add:
[mycellview.contentview addsubview:photo]; //my photo uimageview 
if uncomment line [self.usertable setclipstobounds:no] get: 
but corners not rounded more...... read following questions this , this , still cant figure out? did had problem , can provide fix not force me change code? , how 2 options related each other? lot.
calling setcornerradius applies mask calayer, used mask bounds , create rounded corner effect. calling setmaskstobounds:no, disabling mechanism used round corners.
in short, can't have both ways.
consider making row in tableview taller, or using custom view instead of standard uitableviewcell.
Comments
Post a Comment