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
Post a Comment