oc 中tableView的汇总
来源:互联网 发布:网络密匙是什么 编辑:程序博客网 时间:2024/05/17 10:26
TableViewCell 留出空白间距的方法
-(void)setFrame:(CGRect)frame {
frame.origin.y += 10;
frame.size.height-=10;
frame.size.width-=10;
frame.origin.x +=5;
[super setFrame:frame];
}
automaticallyAdjustsScrollViewInsets
解决表无故偏移
UITableVIew向下偏移20个像素问题
self.automaticallyAdjustsScrollViewInsets = NO;
还有一种可能就是和plain有关
获取cell的位置 CGRect popoverRect = [tableView convertRect:[tableView rectForRowAtIndexPath:indexPath] toView:[tableView superview]];
单行刷新数据- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation {NSIndexPath *indexPath_1=[NSIndexPath indexPathForRow:1 inSection:0];NSArray *indexArray=[NSArray arrayWithObject:indexPath_1];[regTableView reloadRowsAtIndexPaths:indexArray withRowAnimation:UITableViewRowAnimationAutomatic];}
cell的分割线游15像素的位移首先在viewDidLoad方法加入以下代码:[self.tableView setSeparatorInset:UIEdgeInsetsZero];[self.tableView setLayoutMargins:UIEdgeInsetsZero];然后在UITableView的代理方法中加入以下代码- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{[cell setSeparatorInset:UIEdgeInsetsZero];[cell setLayoutMargins:UIEdgeInsetsZero];}
// 设置了一个背景图片 self.tableView.backgroundColor=[UIColor clearColor]; UIImageView *backImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"test.jpeg"]]; self.tableView.backgroundView = backImageView; // 设置毛玻璃 UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; UIVibrancyEffect *vibrancyEffect = [UIVibrancyEffect effectForBlurEffect:blurEffect]; self.tableView.separatorEffect = vibrancyEffect; 要把cell 设置成透明效果
0 0
- oc 中tableView的汇总
- OC的tableView操作
- OC的学习笔记汇总
- OC笔记 - tableView的编辑模式、UITabBarController(2015.3.20)
- OC - Masonry的基本使用(tableView作为实例)
- 汇总-oc
- tableview中cell的设置
- tableview中cell的设置
- iOS中TableView的自定义
- qt中tableview的使用
- swift中tableview的使用
- tableView中deselectRowAtIndexPath的作用
- iOS中TableView的不同类型
- iOS中TableView的不同类型
- 黑马程序员-OC中字符串的操作-NSString+NSMutableString+NSValue+NSAraay用法汇总
- OC与C++的区别参考汇总:
- tableView中deselectRowAtIndexPath的作用 TableView didSelectRowAtIndexPath 不执行
- oc ios ,json,TableView(listView)
- 启动活动的最佳写法
- windows下安装redis
- "Mac OS X"想要进行更改。键入管理员的名称和密码以允许执行此操作("Mac OS X"想使用系统钥匙串)
- CodeForces 624 A. Save Luke(水~)
- Android之AlarmManager
- oc 中tableView的汇总
- IIS服务器同时设置多个网站的三种方式
- No resource found that matches the given name Theme.AppCompat.Light.*
- 此证书签发者无效
- OS视图控制对象生命周期-init、viewDidLoad、viewWillAppear、viewDidAppear、viewWillDisappear、view
- HDU 1850 Being a Good Boy in Spring Festival (Nimm Game)
- 怎么理解负值的margin
- 字符串搜索算法总结
- ObjC类与属性的copy关键字