星空网 > 软件开发 > 操作系统

在UITableViewStylePlain情况下sectionHeader可以与tableview一起滑动的解决方法

-(void)scrollViewDidScroll:(UIScrollView *)scrollView{  CGFloat sectionHeaderHeight = 20;  if (scrollView.contentOffset.y <= sectionHeaderHeight&&scrollView.contentOffset.y > 0) {    scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);  }else if (scrollView.contentOffset.y >= sectionHeaderHeight){    scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);  }}

在 -(void)scrollViewDidScroll:(UIScrollView *)scrollView方法中添加上诉代码即可




原标题:在UITableViewStylePlain情况下sectionHeader可以与tableview一起滑动的解决方法

关键词:ie

ie
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

中东支付习惯:https://www.goluckyvip.com/tag/2607.html
thegreatputonmv:https://www.goluckyvip.com/tag/26070.html
thehellosmile:https://www.goluckyvip.com/tag/26071.html
TheInventory:https://www.goluckyvip.com/tag/26072.html
TheLorry:https://www.goluckyvip.com/tag/26073.html
TheMarket:https://www.goluckyvip.com/tag/26074.html
美国版权小知识-哪些作品能够登记美国版权?:https://www.kjdsnews.com/a/1836627.html
俄罗斯汽车企业进口东风汽车零部件组装雪铁龙汽车:https://www.kjdsnews.com/a/1836628.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流