GithubHelp home page GithubHelp logo

代码冗余 about skarchcutter HOT 3 CLOSED

shuijinliuxi avatar shuijinliuxi commented on June 13, 2024
代码冗余

from skarchcutter.

Comments (3)

shevakuilin avatar shevakuilin commented on June 13, 2024

首先十分感谢你的热心关注,这个提议我之前考虑过,是否将UIView、UIButton和UILabel的处理统一到一个方法里,在发布第一版的时候,我尝试在传入对象的类别判断后对这三个类别做一个统一处理,但是过程不太顺利,如果对渲染前的对象不做具体的类别确定,就拿不到它的layer,如果将类别在传入前就确定好,那么对这个统一处理的方法名又提出了一个要求,看起来不太优雅,我是这么考虑的,决定在下一版的时候对这里进行一个改进。再次对你的关注表示感谢!

from skarchcutter.

shuijinliuxi avatar shuijinliuxi commented on June 13, 2024

UIButton、UILabel 都是 继续自 UIView,直接实现 UIView 就可以了。

from skarchcutter.

shevakuilin avatar shevakuilin commented on June 13, 2024

bingo,我忽略了这个,十分感谢!

from skarchcutter.

Related Issues (5)

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.