Giter VIP home page Giter VIP logo

Comments (3)

liangdrime avatar liangdrime commented on May 22, 2024

如果设置了 #define ST_PULLTOREFRESH_HEADER_HEIGHT xx 支持常用下拉刷新的话,目前没有做UIScrollView的支持。
如果不是支持常用的下拉刷新,UIScrollView是可以支持的。不过有一点需要注意,自己的scrollview需要设置contentSize(UIScrollView的contentSize默认为zero),或者设置shouldAdjustContentSize为YES,自适应调整contentSize。

from swipetableview.

liangdrime avatar liangdrime commented on May 22, 2024

由于考虑项目的扩展性,并没有考虑自定义UIScrollView,实现支持UIScrollView,同时设置#define ST_PULLTOREFRESH_HEADER_HEIGHT xx支持下拉刷新。

不过,在最新的提交中,通过一些修改下拉刷新组件frame的方式,在不设置宏#define ST_PULLTOREFRESH_HEADER_HEIGHT xx的条件下实现下拉刷新的支持。原理就是减小下拉刷新组件(RefreshHeader)的y值,抵消contentInsets的top值影响,是RefreshHeader不被遮挡。
这样可以采用最基本的方式,不设置宏#define ST_PULLTOREFRESH_HEADER_HEIGHT xx来达到所有ScrollView的支持。

具体的实现已经提供在Demo中了,并且实现了简单的下拉刷新组件STRefreshHeader以供参考。

from swipetableview.

zhangkun0625 avatar zhangkun0625 commented on May 22, 2024

目前scrollview是支持的,我要UIwebview,用webview.scrollview是不行的,我改的试试

from swipetableview.

Related Issues (20)

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.