UILabel with cornerRadius inside UITableView -
I'm trying to reflect the count-label used in the apple mail app, which counts messages Indicates the color of the folder / mailbox text is white, and the labels have background gray / blues with spherical corners. ()
To make the same look, I have created a custom UITableViewCell for my table, and tried this type of label like this:
label Layer.cornerRadius = 10.0;
This code basically looks like a matching app, though the performance of this code is actually poor. I installed the app on my iPhone 3G, and after scrolling the table, the scene is actually running slow and unmootable. When I disable the spherical corners, because of that great again. Is my code something wrong, or what can I do to improve performance? Should I use PNG background instead of rounded corners? If so, what do I have to do to adjust the width of PNG background according to width / text length? I've already added the code to do this and it works, but I think this PNG will fix the background image for the background, okay?
It looks like using Conradius
CALayer can be forced to do clipping, which is expensive, you can also do "stretch" as a stretch image (that is, as a background image on the
UIView
lineage Can be used) or it will be CGPath
s or UIBezierPath
s.
Comments
Post a Comment