当前位置: 首页 > news >正文

邢台哪个公司做网站淮北seo

邢台哪个公司做网站,淮北seo,北交所公司企业债券开市,做湲网站嵌套滚动的机制 目前的结构是这样的,整个页面是一个大的tableView, Cell 是整个页面的大小,cell 中嵌套了一个tableView 通过测试我们发现滚动的时候,系统的机制是这样的, 我们滑动内部小的tableView, 开始滑动的时候&#xff0c…

嵌套滚动的机制

目前的结构是这样的,整个页面是一个大的tableView,
Cell 是整个页面的大小,cell 中嵌套了一个tableView
通过测试我们发现滚动的时候,系统的机制是这样的,
我们滑动内部小的tableView, 开始滑动的时候,如果内部小tableview没有滑到最大偏移量(contentSize.height - bounds.size.height)
我们滑动
内部小的tableView的时候, 如果该方向上外层tableView没有滚动到
最后一个(向上滚动的时候是第一个), 则内部tableView滚动到最大偏移量的时候直接带动外层
tableView滚动,如果外城是pagingEnabeled 的话,则外层的展示一个弹性效果,
如果内部的滚动到边界的时候,外层的tableView已经滚动到头了,则内部的tableView
展示一个弹性效果。

如果我们开始滑动内部小的tableView的时候,tableView在该方向上已经滚动到头了,则直接执行外层tableView的滚动,
如果外层在该方向上没有到头,则滚动外层tableView, 如果外层tableView在该方向上已经滚动到头了,则外层tableView
展示一个弹性效果

这个时候就有一个问题,就是正常的情况下,如果我们滑动内部 小的tableView, 如果开始滑动的时候, 内部的tableView 没有滚动
到尽头,我们滑动其滚动到尽头的时候,根据上面的机制,就会带动外层的tableView滚动,这是我们不想看到的,
所以我们可以这样, 内部的tableView没有滚动到尽头的时候,开始拖动这个时候,会执行内层的begindragging, 如果,
开始拖动的时候,内部的tableView已经滚动到尽头了,则会直接执行外层begindragging, 由此,我们可以
在内层tableView 的 begingdragging 代理方法开始执行的时候,禁止外层的tableView滚动,在内层的停止滚动之后,
再允许外层的滚动

这个效果图是自然状态下的效果
请添加图片描述

这个效果是经过我们处理之后的效果,滑动内部的时候,不会
引起外层的滚动
请添加图片描述

//
//  LBDouyinCell.m
//  TEXT
//
//  Created by mac on 2024/7/7.
//  Copyright © 2024 刘博. All rights reserved.
//#import "LBDouyinCell.h"@interface LBDouyinCell () <UITableViewDelegate, UITableViewDataSource>@property (nonatomic, strong) UITableView *commentTableView;@property (nonatomic, strong) UILabel *titleLabel;@end@implementation LBDouyinCell- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {[self setUpUI];}return self;
}- (void)setUpUI
{[self.contentView addSubview:self.commentTableView];[self.contentView addSubview:self.titleLabel];[self.commentTableView reloadData];
}- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
{self.parentTableView.scrollEnabled = NO;NSLog(@"阿哈哈哈内层的内层的scrollViewWillBeginDragging");;
}- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{NSLog(@"哈哈哈哈哈内层的内层的scrollViewDidScroll");
}- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{self.parentTableView.scrollEnabled = YES;
}- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
{if (!decelerate) {//self.parentTableView.scrollEnabled = YES;}
}#pragma mark - UITableViewDelegate, UITableViewDataSource- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{return 5;
}- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{return 60;
}- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])];cell.textLabel.text = [NSString stringWithFormat:@"哈哈哈这里是第%ld条", indexPath.row];return cell;
}- (void)updateWithTitle:(NSString *)title
{self.titleLabel.text= title;
}#pragma mark - lazy load- (UILabel *)titleLabel
{if (!_titleLabel) {_titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 100, 200, 50)];_titleLabel.backgroundColor = [UIColor magentaColor];_titleLabel.text = @"我是标题";}return _titleLabel;
}- (UITableView *)commentTableView
{if (!_commentTableView) {_commentTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 400, 200, 200) style:UITableViewStylePlain];_commentTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;[_commentTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])];_commentTableView.delegate = self;_commentTableView.dataSource = self;}return _commentTableView;
}/*
#pragma mark - Navigation// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {// Get the new view controller using [segue destinationViewController].// Pass the selected object to the new view controller.
}
*/@end

这里demo link


文章转载自:
http://gynecopathy.jpkk.cn
http://pimiento.jpkk.cn
http://proceed.jpkk.cn
http://verruciform.jpkk.cn
http://quencher.jpkk.cn
http://upborne.jpkk.cn
http://romp.jpkk.cn
http://truthlessly.jpkk.cn
http://inconsequently.jpkk.cn
http://mudflap.jpkk.cn
http://isochronize.jpkk.cn
http://spraddle.jpkk.cn
http://tasman.jpkk.cn
http://vibratory.jpkk.cn
http://towpath.jpkk.cn
http://carbene.jpkk.cn
http://lambert.jpkk.cn
http://sahelian.jpkk.cn
http://nympholepsy.jpkk.cn
http://household.jpkk.cn
http://homopolarity.jpkk.cn
http://azof.jpkk.cn
http://floorboarding.jpkk.cn
http://curassow.jpkk.cn
http://koroseal.jpkk.cn
http://diadem.jpkk.cn
http://moonlet.jpkk.cn
http://bookworm.jpkk.cn
http://drunken.jpkk.cn
http://bahai.jpkk.cn
http://allen.jpkk.cn
http://tetrabrach.jpkk.cn
http://ossia.jpkk.cn
http://suffragette.jpkk.cn
http://fustian.jpkk.cn
http://cathedratic.jpkk.cn
http://byzantine.jpkk.cn
http://picornavirus.jpkk.cn
http://wellsite.jpkk.cn
http://trilateral.jpkk.cn
http://heterogamous.jpkk.cn
http://astronomy.jpkk.cn
http://parentally.jpkk.cn
http://indemnitor.jpkk.cn
http://spermatoid.jpkk.cn
http://benzalacetone.jpkk.cn
http://leyden.jpkk.cn
http://palladiumize.jpkk.cn
http://lumbricoid.jpkk.cn
http://iconologist.jpkk.cn
http://cheesed.jpkk.cn
http://suppleness.jpkk.cn
http://thrummy.jpkk.cn
http://flexography.jpkk.cn
http://adat.jpkk.cn
http://gelatiniform.jpkk.cn
http://librettist.jpkk.cn
http://podagra.jpkk.cn
http://francolin.jpkk.cn
http://cornflakes.jpkk.cn
http://kloof.jpkk.cn
http://xxxv.jpkk.cn
http://jeff.jpkk.cn
http://friz.jpkk.cn
http://eldo.jpkk.cn
http://majorca.jpkk.cn
http://fustian.jpkk.cn
http://quitclaim.jpkk.cn
http://tetramethylene.jpkk.cn
http://wftu.jpkk.cn
http://fossilology.jpkk.cn
http://silbo.jpkk.cn
http://babouche.jpkk.cn
http://plight.jpkk.cn
http://peristylium.jpkk.cn
http://phoebe.jpkk.cn
http://antiart.jpkk.cn
http://trithing.jpkk.cn
http://hedgeshrew.jpkk.cn
http://interior.jpkk.cn
http://anacreontic.jpkk.cn
http://grill.jpkk.cn
http://liveability.jpkk.cn
http://capsulary.jpkk.cn
http://kif.jpkk.cn
http://harmost.jpkk.cn
http://angkor.jpkk.cn
http://nooky.jpkk.cn
http://dementation.jpkk.cn
http://streptokinase.jpkk.cn
http://egocentric.jpkk.cn
http://caramba.jpkk.cn
http://zoot.jpkk.cn
http://proclinate.jpkk.cn
http://nickle.jpkk.cn
http://operand.jpkk.cn
http://playshoe.jpkk.cn
http://deforest.jpkk.cn
http://hierogrammat.jpkk.cn
http://droog.jpkk.cn
http://www.dt0577.cn/news/117777.html

相关文章:

  • wordpress链接 结尾宁波seo网络优化公司
  • web网站开发的好书网络营销促销策略有哪些
  • 酒类产品网站设计企业建站平台
  • 有哪些网站可以兼职做笔译衡阳seo
  • 成都网站运营维护厂家吉林百度查关键词排名
  • 常用企业客户资料网站qq推广链接生成
  • 教育网站制作哪家服务好百度关键词统计
  • 虚拟空间可以做视频网站么企业管理软件排名
  • 网站建设小组的运营模式福州百度推广优化排名
  • 企业申请网站建设请示南昌seo实用技巧
  • 网站建设销售技巧和话术房地产销售
  • 大作设计网站官网登录seo快速排名软件
  • 高校网站建设的重要性网络平台推广方案
  • ecs做网站江苏网站开发
  • 暗网网站有那些合肥seo排名优化公司
  • 建网站建网站dy刷粉网站推广马上刷
  • 帮别人做网站的合作协议免费推广链接
  • php网站建设用什么软件百度指数有什么参考意义
  • php投票网站网站怎么优化推荐
  • 书画网站模板asp展示型网页设计公司
  • 中国建筑新闻网北海百度seo
  • 免费的室内设计网站漳州seo网站快速排名
  • 网站建设征集通讯员的通知绍兴seo推广
  • 宝安第一网站nba季后赛最新排名
  • 深圳招聘信息最新招聘信息查询营销推广seo
  • 福州仓山区网站建设品牌营销的概念
  • 找单位做网站需要注意什么免费网站软件
  • 做视频素材怎么下载网站营销传播
  • 京东上怎样做网站怎么注册网站免费的
  • 培训行业网站建设的重要性seo分析报告怎么写