Objective-C GCC Code Block Evaluation C Extension ({…})语法
2015-07-22 17:26
621 查看
前一段,看公司的大牛写的代码,发现一个类似下面这样的语法写UI,顿时感觉很不错,尝试之后,发现两个优点,一个是结构会更加清晰,第二个可以使用非常简洁的命名来命名局部变量,写起来会很优雅。
这个是GCC编译器的一个语法,详细资料可以参考下面的文章。代码示例可以参考REMenu
参考:
http://nshipster.com/new-years-2014/
http://cocoa-dom.tumblr.com/post/56517731293/new-thing-i-do-in-code
http://stackoverflow.com/questions/22023070/assignment-of-several-statements-enclosed-in-parentheses-and-curly-braces-in-obj,http://stackoverflow.com/questions/19732070/objective-c-declare-vars-with
sample code:https://github.com/romaonthego/REMenu
这个是GCC编译器的一个语法,详细资料可以参考下面的文章。代码示例可以参考REMenu
参考:
http://nshipster.com/new-years-2014/
http://cocoa-dom.tumblr.com/post/56517731293/new-thing-i-do-in-code
http://stackoverflow.com/questions/22023070/assignment-of-several-statements-enclosed-in-parentheses-and-curly-braces-in-obj,http://stackoverflow.com/questions/19732070/objective-c-declare-vars-with
sample code:https://github.com/romaonthego/REMenu
相关文章推荐
- object-c 知识点01
- 【iOS开发系列】NSObject方法介绍
- OC学习笔记之self关键字
- Objective-C学习之旅 第二篇
- OC学习笔记之description
- OC学习笔记之多态
- Objective-C学习笔记(二)——OC基本语法概述
- OC学习之类的进阶
- JSONObject与JSONArray的使用
- 2015年Objective-C有哪些新功能?
- Objective-C学习笔记(一)——OC语言的特点
- Objective-C中应用断言_assert()
- 关于self.与_的区别
- iOS开发——高级篇——Objective-C特性:Runtime
- OC中的代理设计模式
- BC400-Unit5:Complex Data Objects
- [Android]JsonObject解析
- Microsoft VBScript 运行时错误 (0x800A0046) 没有权限: 'CreateObject' 解决方法
- Objective-C Runtime 运行时之四:Method Swizzling
- Scripting.FileSystemObject控件的用法