iphone - Does using Quartz layers slow down UITableView scrolling performance? -


i have uiimageview being rounded on custom drawn uitableviewcell:

        rect = cgrectmake(13, 10, 48, 48);         avatar = [[uiimageview alloc] initwithframe:rect];         [self.contentview addsubview: avatar];          calayer * l = [avatar layer];         [l setmaskstobounds:yes];         [l setcornerradius:9.0]; 

i noticed uitableview scrolling performance decreased little bit. not sure if related rounded corners though?

rounded corners slow down drawing lot. mask layers faster. "baking" corners content (as image or using clipping path in drawrect:) faster still.

allocating new views/layers slow down scrolling--reuse them wherever can (creating uitableviewcell subclass creates subviews in init , destroys them in dealloc works well)

that being said, adding additional views shouldn't reduce performance noticeably.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -