tableView的Cell调整imageView的大小
来源:互联网 发布:sai绘画软件下载 编辑:程序博客网 时间:2024/05/17 07:06
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CellIdentifier"]; if(!cell){ cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"CellIdentifier"]; } UserModel *user = self.dataSource[indexPath.row]; [cell.imageView setImage:[UIImage imageNamed:user.imageName]]; //2、调整大小 CGSize itemSize = CGSizeMake(60, 60); UIGraphicsBeginImageContextWithOptions(itemSize, NO, UIScreen.mainScreen.scale); CGRect imageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height); [cell.imageView.image drawInRect:imageRect]; cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [cell.textLabel setText:user.name]; [cell.detailTextLabel setText:user.message]; return cell;}
0 0
- tableView的Cell调整imageView的大小
- 修改cell.imageView的大小
- tableView 的 cell 和 cell 的 imageView 的属性
- ios tableview 那些事(二十四) 固定cell.imageView.image的大小
- 改变cell的imageview的大小
- 固定cell.imageView.image的大小
- 固定cell.imageView.image的大小
- 固定cell.imageView.image的大小
- 固定cell.imageView.image的大小
- 修改原生cell.imageView.image的大小
- 改变UITableViewCell的imageView的大小(cell.imageView)
- 重新调整imageview的drawable的大小
- tableView默认样式cell.imageView位置的设定
- 设置 TableView 的 Cell 的位置和大小
- tableview cell的移动
- 调整系统cell 上的UIimageView 的大小
- tableViewCell调整其中自带的imageView的大小
- ios 关于如何调整cell.imageView中的ImageView大小及位置
- 工作中出现的问题及解决步骤总结(可能在大牛看来,很low,但自己真的有收获)
- Ini文件遍历
- 文章标题
- Android 计算器 sin cos tan 值问题
- 【Java并发编程】之四:守护线程与线程阻塞的四种情况 (r)
- tableView的Cell调整imageView的大小
- C#基础知识(九)队列、栈、链表
- c语言strcpy和memcpy
- java中数组与容器的区别
- 92.leetcode Reverse Linked List II(medium)[链表逆序]
- 传智播客推出少儿教育品牌-酷丁鱼
- 【Java并发编程】之五:volatile变量修饰符—意料之外的问题(含代码)(r)
- TRANSFORM_TEX
- LeetCode | Largest Rectangle in Histogram