iphone - 第二个图像将如何查看 tableview 单元格?

标签 iphone ios facebook-graph-api uitableview uiimageview

我正在实现一个应用程序,它有 2 个图像,我需要在同一个 tableviewcell 上显示。

但是,由于应用程序的设置方式,我无法将 tableviewcell 子类化。所以我想以编程方式创建一个 ImageView ,然后添加到 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];

关于iphone - 第二个图像将如何查看 tableview 单元格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10506321/

相关文章:

iphone - iPhone 现在禁止使用 MonoTouch 了吗?

ios - 检测 iPhone 电源按钮按下事件以防止 iOS 中的屏幕截图

ios - Objective C 中两个数组中的字符串搜索

java - ParseFile 的图像 URL?

android - Facebook 深层链接始终打开 Google Play 商店

facebook - 使用对象类型为 "pages"的 facebook 图形 api/搜索端点的替代方法

ios - 为所有页面添加导航栏和标签栏

ios - 应用程序可以在模拟器上运行,但不能在设备上运行。Https Web 服务问题

ios - 从尚未提交的上下文中获取数据。核心数据

ios - UIImageView.animationImages 显示旋转图像