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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -