UITableView 怎么显示图片 一排两个 RT 还有不能用CollectionView 大家帮帮忙呀 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 自定义 UITableViewCell 网上很多教程 可以使用UIScrollView 自已计算位置并将图片添加到UIScrollView上主要是计算图片的坐标位置及设置UIScrollView的contentSize. 固定一排2个图片用UIScrollView未免有点绕道了。自定义UITableView Cell 比较常规。 http://zheyiw.iteye.com/blog/1672969http://my.oschina.net/plumsoft/blog/51723xib里根据需要并排放2个UIImageView 定义一个基于UITableViewCell的类,定义两个UIImageView对象,并在init里面初始化,dealloc里面释放;.h@property (retain, nonatomic) UIImageView *imageView1;@property (retain, nonatomic) UIImageView *imageView2;.m@sy....:imageView1;@sy....:imageView2;- dealloc { [imageView1 release]; [imageView2 release];}- initWith...{ self = ... if(self){ self.imageView1 = [[[UIImageView alloc]initWithFrame:]autorelease]; self.imageView2 = [[[UIImageView alloc]initWithFrame:]autorelease]; [self.contentView addSubView:imageView1]; [self.contentView addSubView:imageView2]; } return self;}在 UITableView的DataSource里面:MyTableViewCell *cell = {MyTableViewCell*)[table deq...];if(cell == nil){ cell = [[[MyTableViewCell alloc]]initwith...]]autorealse];} cell.imageView1.image = [UIImage imageName:...]; cell.imageView2.image = [UIImage imageName:...]; 菜鸟求一个 把照片传到服务器的代码! 请问,如何将图片做成uibutton的选中效果?请看图 Mac(10.7-Lion)系统,里面有开发模拟器么?模拟器可以登陆QQ么? 如何组装一台电脑安装mac os10.5.7 iphone事件处理函数都在ViewController中实现吗? iOS开发有没有Java里的开源框架的概念? 请教IOS页面跳转动画问题(手机淘宝) 问点百度地图的问题 求大神指导一下 视频实时监控开发 登陆限制问题,大神进来 BOOL*是什么意思 为什么运行时老是提示我在定义的uiview对象名面前加下划线_?
主要是计算图片的坐标位置及设置UIScrollView的contentSize.
http://my.oschina.net/plumsoft/blog/51723xib里根据需要并排放2个UIImageView
.h
@property (retain, nonatomic) UIImageView *imageView1;
@property (retain, nonatomic) UIImageView *imageView2;.m
@sy....:imageView1;
@sy....:imageView2;
- dealloc {
[imageView1 release];
[imageView2 release];
}
- initWith...{
self = ...
if(self){
self.imageView1 = [[[UIImageView alloc]initWithFrame:]autorelease];
self.imageView2 = [[[UIImageView alloc]initWithFrame:]autorelease];
[self.contentView addSubView:imageView1];
[self.contentView addSubView:imageView2]; }
return self;
}在 UITableView的DataSource里面:MyTableViewCell *cell = {MyTableViewCell*)[table deq...];if(cell == nil){
cell = [[[MyTableViewCell alloc]]initwith...]]autorealse];
}
cell.imageView1.image = [UIImage imageName:...];
cell.imageView2.image = [UIImage imageName:...];