Objective-C
Joe周鸟
欢迎来微博交流:Joe周鸟
公众号:AISphere
展开
-
Objective-C语法之代码块(block)的使用
代码块本质上是和其他变量类似。不同的是,代码块存储的数据是一个函数体。使用代码块是,你可以像调用其他标准函数一样,传入参数数,并得到返回值。 脱字符(^)是块的语法标记。按照我们熟悉的参数语法规约所定义的返回值以及块的主体(也就是可以执行的代码)。下图是如何把块变量赋值给一个变量的语法讲解: 按照调用函数的方式调用块对象变量就可以了: int result = myB转载 2016-03-06 18:27:44 · 488 阅读 · 0 评论 -
浅谈UIViewController 使用-addChildViewController自定义视图控制器
View Controllers 是APP内在架构的基础,总体来讲一个APP的View Controllers 主要由以下两种设计而成: There are two types of view controllers: Content view controllers manage a discrete piece of your app’s content and are the main ty原创 2016-03-17 23:19:04 · 778 阅读 · 0 评论