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 

enter image description here

if uncomment line [self.usertable setclipstobounds:no] get: enter image description here

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

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -