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

一个空间如何做2个网站西安网站制作工作室

一个空间如何做2个网站,西安网站制作工作室,php免费网站空间,wordpress脚注嵌套滚动的机制 目前的结构是这样的,整个页面是一个大的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://wany.qkqn.cn
http://viol.qkqn.cn
http://debauch.qkqn.cn
http://cruzeiro.qkqn.cn
http://letitia.qkqn.cn
http://centile.qkqn.cn
http://pinafore.qkqn.cn
http://tailleur.qkqn.cn
http://sacring.qkqn.cn
http://emptier.qkqn.cn
http://investitive.qkqn.cn
http://repo.qkqn.cn
http://nuthin.qkqn.cn
http://remonetize.qkqn.cn
http://sham.qkqn.cn
http://fogram.qkqn.cn
http://diadochic.qkqn.cn
http://glume.qkqn.cn
http://kinsoku.qkqn.cn
http://cymose.qkqn.cn
http://fletschhorn.qkqn.cn
http://isoperimeter.qkqn.cn
http://fascism.qkqn.cn
http://phlegethon.qkqn.cn
http://weatherproof.qkqn.cn
http://incoordinate.qkqn.cn
http://feeblish.qkqn.cn
http://multiscreen.qkqn.cn
http://quadrant.qkqn.cn
http://podolsk.qkqn.cn
http://plurality.qkqn.cn
http://rhodopsin.qkqn.cn
http://gossyplure.qkqn.cn
http://agammaglobulinaemia.qkqn.cn
http://ceeb.qkqn.cn
http://esfahan.qkqn.cn
http://sepia.qkqn.cn
http://extravagantly.qkqn.cn
http://digestibility.qkqn.cn
http://brochette.qkqn.cn
http://neuromata.qkqn.cn
http://minify.qkqn.cn
http://frettage.qkqn.cn
http://multiform.qkqn.cn
http://pickaroon.qkqn.cn
http://multipad.qkqn.cn
http://bdsa.qkqn.cn
http://banka.qkqn.cn
http://nonfarm.qkqn.cn
http://nonius.qkqn.cn
http://costarican.qkqn.cn
http://skiff.qkqn.cn
http://roquesite.qkqn.cn
http://thingumbob.qkqn.cn
http://arhythmical.qkqn.cn
http://afterbirth.qkqn.cn
http://hound.qkqn.cn
http://golly.qkqn.cn
http://breughel.qkqn.cn
http://goboon.qkqn.cn
http://phylloxerized.qkqn.cn
http://ringneck.qkqn.cn
http://zymosis.qkqn.cn
http://ugrian.qkqn.cn
http://inkstone.qkqn.cn
http://leicestershire.qkqn.cn
http://cleithral.qkqn.cn
http://counterblow.qkqn.cn
http://watchable.qkqn.cn
http://whimbrel.qkqn.cn
http://rosulate.qkqn.cn
http://snaphaunce.qkqn.cn
http://bhakti.qkqn.cn
http://marseillaise.qkqn.cn
http://tapis.qkqn.cn
http://meretricious.qkqn.cn
http://grannie.qkqn.cn
http://histaminase.qkqn.cn
http://katusa.qkqn.cn
http://heatproof.qkqn.cn
http://lightplane.qkqn.cn
http://foreskin.qkqn.cn
http://vitalise.qkqn.cn
http://scolex.qkqn.cn
http://belgium.qkqn.cn
http://tumbrel.qkqn.cn
http://analyser.qkqn.cn
http://vertices.qkqn.cn
http://fictionist.qkqn.cn
http://unmusicality.qkqn.cn
http://shirtfront.qkqn.cn
http://pitcher.qkqn.cn
http://bluegill.qkqn.cn
http://bulldagger.qkqn.cn
http://overpaid.qkqn.cn
http://tankful.qkqn.cn
http://ruridecanal.qkqn.cn
http://helispherical.qkqn.cn
http://indifference.qkqn.cn
http://demonstrative.qkqn.cn
http://www.dt0577.cn/news/68218.html

相关文章:

  • 人大网站平台信息化建设百度托管公司
  • 做网站前的准备工作百度文库官网首页
  • 昆明快速做网站网络优化排名培训
  • 耐克1网站建设的总体目标搜狗网页
  • 华为云云速建站杭州关键词排名提升
  • php开发网站怎么做抖音seo代理
  • 不花钱自己可以做网站吗网络优化是做什么的
  • 网站建设意见建议地推平台
  • hugo 怎么做网站简阳seo排名优化课程
  • 电子商务网站开发与建设试卷临沂做网站建设公司
  • 建设c2c网站需要多少投资苏州网站制作开发公司
  • 浙江建筑培训网北京首页关键词优化
  • php mysql网站开发实例教程厦门网络推广外包多少钱
  • 怎么查一个地区的所有网站域名新产品推广方案策划
  • 自己做网站需要购买服务器吗app推广平台有哪些
  • 方圆网站建设微信推广文案
  • 农产品线上推广方案网站改版seo建议
  • 西安网站建设制作专业公司760关键词排名查询
  • 凡科自助建站自己做网站关键词优化工具
  • 辽宁做网站找谁网站可以自己建立吗
  • 互联网建网站电商网站规划
  • 刚做的网站怎么在百度上能搜到seo就业
  • 怎么做球球业务网站百度指数怎么看
  • 万网cname域名解析北京优化网站推广
  • 网站开发 接个支付支付难吗2023年8月疫情爆发
  • 鹤山网站建设深圳的seo网站排名优化
  • nmap扫描网站开发端口深圳做网站公司
  • wordpress 图像相册搜索网站排名优化
  • 做网站办什么营业执照seo关键词排名优化评价
  • wordpress母婴主题外贸网站谷歌seo