UIViewController
摘要:UIViewController 在MVC模式中就是C。关于MVC,可以看 UIViewController 主要具有什么功能呢? View Management When you define a new subclass of UIViewController, you must specify the views to be managed by the controller. A typ...
阅读全文
C++的异常处理之一:throw是个一无是处的东西
摘要:看这篇文章学习C++异常处理的基础知识。看完后,还不过瘾,为什么大家在C++代码中都不用Exception?为什么C++11会引入一些变化?为什么C++ exception handling需要unwind stack?为什么throw会被抛弃?接着看http://www.gotw.ca/publi...
阅读全文
About Closure
摘要:Closure被翻译为闭包,C++11引入了Lambda表达式支持Closure,JavaScript支持Closure,Objective C支持Blocks,他们都是Closure,名字各有不同,可是Closure到底有什么用呢?为什么C++11要引入这个东西呢? 按照Wikipedia上的总结,他们都可以统统被叫做Anonymous Function(匿名函数),这样一说,可能很多人就变得没...
阅读全文
理解Objective C 中id
摘要:什么是id,与void *的区别id在Objective C中是一个类型,一个complier所认可的Objective C类型,跟void *是不一样的,比如一个 id userName, 和void *pUserName,[userName print] 是可以的,但[pUserName pri...
阅读全文