Comments (4)
关于代码格式的问题,我们团队内部也讨论过,主要是苹果官方对这种细节并没有明确的标准可以参考,包括 UIKit 自身在空格的使用方面也掺杂着各种不同的写法,你可以看 iOS 10.2 里,UIView.h 里的 layer
属性 和 focused
属性就是用不同的空格写法。
因此我们最终统一选择目前这种 property 和 ( 之间无空格的写法。
from qmui_ios_codesnippets.
建议可以 fork 一份再自己调整,这个仓库只会新增,基本不会修改已有的代码片段,适合 fork。
from qmui_ios_codesnippets.
受益匪浅,感谢大神百忙之中回复问题,还给了一些示例.
from qmui_ios_codesnippets.
关于代码格式的问题,我们团队内部也讨论过,主要是苹果官方对这种细节并没有明确的标准可以参考,包括 UIKit 自身在空格的使用方面也掺杂着各种不同的写法,你可以看 iOS 10.2 里,UIView.h 里的
layer
属性 和focused
属性就是用不同的空格写法。
因此我们最终统一选择目前这种 property 和 ( 之间无空格的写法。
是的,苹果对规范这一点儿的确做的不够,不过您提到的在不同版本 SDK 中的写法不一致也算是不同时期的规范了.
from qmui_ios_codesnippets.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qmui_ios_codesnippets.