Git Product home page Git Product logo

Comments (4)

wkjCoder avatar wkjCoder commented on June 20, 2024

OC版本同样遇到底部留白问题,考虑或许也是安全边距问题

from jxpagingview.

Tory-Xu avatar Tory-Xu commented on June 20, 2024

@forkdog 通过这种方式修改部分系统上还是会存在问题。

场景:竖屏切换到横屏
系统:iPhone 11 iOS 14.1(模拟器), iPhone 13 iOS 15.6.1(真机) - - 个人使用设备情况
注:iPhone 14 iOS 16.0 模拟器正常

在上述设备的情况下,在竖屏切换到横屏的过程中,tableView 的 layoutSubview 方法会被执行,此时在 cellForRow 中获取到 cell.contentView.frame 包含安全区域的空间;在横竖屏结束之后,contentView.frame 会发生变化,减少了左右安全区域的宽度。而 contentView frame 变化时不会重新调整 listContainerView 的 frame,最后 listContainerView 的大小会出现错误。

我的解决方案:
这里的布局方式替换成约束布局

from jxpagingview.

ebamboo avatar ebamboo commented on June 20, 2024

iOS 16.1 下运行会出现底部空白,iOS14.1下运行正常显示

from jxpagingview.

ebamboo avatar ebamboo commented on June 20, 2024

底部空白的高度应该是安全区域的底部间距,所以多计算了一次距离导致底部留白

from jxpagingview.

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.