Is there any known way to resize the imageView of a UITableViewCell
to a fixed size, so the text on the right is always aligned?
Alternatively, I'd position the textLabels to a fixed position with a fixed width.
However, setting center, frame or bounds on both the labels and the imageView results in nothing.
Does anyone has the code handy how to create a transparent UIImage
(well, or CGImage
) and copy my image in the center of it, without any scaling applied?
子类化UITableViewCell并重写-layoutSubviews。
如果您不喜欢内置标签和图像视图,则可以创建自己的标签并将其添加为子视图。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.