Giter VIP home page Giter VIP logo

Comments (4)

LikeNeko avatar LikeNeko commented on May 24, 2024

如果没有更好的办法似乎只能全文改equal()里的值改成计算之后的了

from tangramkit.

youngsoft avatar youngsoft commented on May 24, 2024
  1. 对于SizeClass 主要是用于解决横竖屏的差异适配,以及plus系列的横屏特殊处理,以及iPad的适配问题。从您的描述中SizeClass看来是不能满足的。
  2. 目前针对各种屏幕适配的场景尽量可能的话用相对比例值,以及多用.fill属性而不要写死宽高。
    3.目前针对padding的设置确实只支持固定值。
    4.如果你想针对不同屏幕按比例来进行缩放的话,可以参考使用TGDimeAdapter这个类里面的一些方法,这个类是封装floor(CGFloat(Float(100) * Float((UIScreen.main.bounds.width/375.0)))) 中的实现。

from tangramkit.

LikeNeko avatar LikeNeko commented on May 24, 2024

明白了,谢谢

from tangramkit.

LikeNeko avatar LikeNeko commented on May 24, 2024

针对这个问题是否可以将TGDimeAdapter类封装在equal()方法里呢?然后加个配置,如果指定的话就执行一下方法?

from tangramkit.

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.