Coder Social home page Coder Social logo

Comments (4)

MoLice avatar MoLice commented on June 9, 2024 1

关于代码格式的问题,我们团队内部也讨论过,主要是苹果官方对这种细节并没有明确的标准可以参考,包括 UIKit 自身在空格的使用方面也掺杂着各种不同的写法,你可以看 iOS 10.2 里,UIView.h 里的 layer 属性 和 focused 属性就是用不同的空格写法。
因此我们最终统一选择目前这种 property 和 ( 之间无空格的写法。

from qmui_ios_codesnippets.

MoLice avatar MoLice commented on June 9, 2024 1

建议可以 fork 一份再自己调整,这个仓库只会新增,基本不会修改已有的代码片段,适合 fork。

from qmui_ios_codesnippets.

yingkong1987 avatar yingkong1987 commented on June 9, 2024

受益匪浅,感谢大神百忙之中回复问题,还给了一些示例.

from qmui_ios_codesnippets.

JxJPu9bD avatar JxJPu9bD commented on June 9, 2024

关于代码格式的问题,我们团队内部也讨论过,主要是苹果官方对这种细节并没有明确的标准可以参考,包括 UIKit 自身在空格的使用方面也掺杂着各种不同的写法,你可以看 iOS 10.2 里,UIView.h 里的 layer 属性 和 focused 属性就是用不同的空格写法。
因此我们最终统一选择目前这种 property 和 ( 之间无空格的写法。

是的,苹果对规范这一点儿的确做的不够,不过您提到的在不同版本 SDK 中的写法不一致也算是不同时期的规范了.

from qmui_ios_codesnippets.

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.