iphone - Why can't I add a mask to UITableViewCell's contentView? -


is not possible?

i've tried this:

    uibezierpath *maskpath; maskpath = [uibezierpath bezierpathwithroundedrect:cgrectmake(20, 20, 200, 30) byroundingcorners:(uirectcornertopright | uirectcornertopleft) cornerradii:cgsizemake(8.0, 8.0)];  cashapelayer *masklayer = [[cashapelayer alloc] init]; masklayer.frame = self.bounds; masklayer.path = maskpath.cgpath; masklayer.fillcolor = [uicolor blackcolor].cgcolor;  self.contentview.layer.mask = masklayer; self.contentview.layer.maskstobounds = yes; 

and nothing happens. however, if same thing upon view in contentview, mask works expected. gives?

it worked me if took "contentview" out of last 2 lines of code. don't know why works, maybe can't mask content view?


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -