Coder Social home page Coder Social logo

Comments (1)

bawn avatar bawn commented on May 23, 2024

@MorningStarJ 能麻烦提供一个 Demo 吗,我不能复现 crash 的情况。但猜测你说的『偏移一个屏幕的宽度』原因是没有在子 viewcontroller 上调整相应的 headerview 的高度,至于为什么要这样子做可以看我博客中提到的

从整体结构上来看即刻只有二级 ScrollView,所以在纵向上 ChildScrollView 会完全接管手势,横向滚动时又由 MainScrollView 控制,这样子带来的好处在于无需关心手势冲突问题,但要实现前面提到的效果还必须处理是以下问题:
HeaderView 和 MenuView 的位置需要根据 ChildScrollView 的滚动而改变
在切换的 Tab 的时候需要同步下一个 ChildScrollView 的 offset
ChildScrollView 必须在顶部留出 HeaderView 和 MenuView 高度总和的空白区域
HeaderView 不能拦截滚动手势

from shazam.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.