Tekkaman

导航

 

2014年2月15日

摘要: 【Working with nil】 It’s always a good idea to initialize scalar variables at the time you declare them, otherwise their initial values will contain garbage from the previous stack contents: This isn’t necessary for object pointers, because the compiler will automatically set the variable to nil ... 阅读全文
posted @ 2014-02-15 22:51 Tekkaman 阅读(300) 评论(0) 推荐(0)
 
摘要: 【Determining Equality of Objects】 If you need to determine whether one object is the same as another object, it’s important to remember that you’re working with pointers.The standard C equality operator == is used to test equality between the values of two variables, like this: When dealing with... 阅读全文
posted @ 2014-02-15 21:45 Tekkaman 阅读(246) 评论(0) 推荐(0)
 
摘要: 【NSLog中的%@】 There is one additional substitution token available in Objective-C, %@, used to denote an object. At runtime, this specifier will be substituted with the result of calling either the descriptionWithLocale: method (if it exists) or the description method on the provided object. The desc. 阅读全文
posted @ 2014-02-15 21:27 Tekkaman 阅读(2769) 评论(0) 推荐(0)