[英]How would a second image view to a tableview cell?
我正在实现一个应用程序,该应用程序需要在同一tableviewcell上显示2张图像。
但是由于应用程序的设置方式,我无法继承tableviewcell。 所以我想以编程方式创建一个图像视图,然后将其添加到cell.contentview,但结果是错误的。 任何帮助将不胜感激。
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[imageView setFrame:CGRectMake(x,y,width,height)]; //note this is in the cell coordinate system
[cell.contentView addSubview:imageView];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.