《Objective-C基础教程》的原文摘录

  • 聚集在一个单元的部件集合,包含头文件、库、图像、声音文件等。 每个框架都有一个主头文件,导入主头文件可使用所有框架特性。 (查看原文)
    哈维高 2回复 1赞 2012-04-20 13:17:37
    —— 引自第2页
  • - (查看原文)
    剑底扬程 1赞 2012-05-12 15:22:16
    —— 引自第36页
  • Ojective中,处理字符串可能非常痛苦,应为它没有内置正则表达式功能。 (查看原文)
    剑底扬程 1赞 2012-05-13 16:22:22
    —— 引自第254页
  • 开发iphone程序'不能使用垃圾回收'苹果公司也不建议使用autorelease (查看原文)
    马拉 1赞 2012-07-21 09:00:42
    —— 引自第142页
  • * When you create an object using new, alloc, or copy, the object has a retain count of 1. You are responsible for sending the object a release or autorelease message when you’re done with it. That way, it gets cleaned up when its useful life is over. * When you get hold of an object via any other mechanism, assume it has a retain count of 1 and that it has already been autoreleased. You don’t need to do any fur- ther work to make sure it gets cleaned up. If you’re going to hang on to the object for any length of time, retain it and make sure to release it when you’re done. * If you retain an object, you need to (eventually) release or autorelease it. Balance these retains and releases. (查看原文)
    Hu 2012-03-07 16:05:52
    —— 引自第172页
  • 我们将在后面详细阐述init方法的章节里深入研究这个主题,所以现在,请微笑点头并继续学习下面内容。 (查看原文)
    [已註銷] 2012-04-18 21:54:27
    —— 引自第61页
  • 是的,我知道人们普遍认为程序员就是孤独的。但是有时候,你也需要听一听与你想法不一样的地方。 (查看原文)
    Neckau 2012-04-30 10:52:42
    —— 引自第102页
  • C使用方括号引用数组元素. . . 在Objective-C中,方括号还有其他意义:它们用于通知某个对象该做什么。在方括号内,第一项是对象,其余部分是你需要对象执行的操作。 在Objective-C中,通知对象执行某个操作称为发送消息(有人也将其称为“调用方法”)。 (查看原文)
    剑底扬程 2012-05-12 12:49:02
    —— 引自第32页
  • - (查看原文)
    剑底扬程 2012-05-12 13:52:04
    —— 引自第34页
  • 在Objective-C 中只要看到@符号,都可以看成是C语言的扩展。 (查看原文)
    剑底扬程 2012-05-12 14:49:14
    —— 引自第35页
  • - (查看原文)
    剑底扬程 2012-05-12 16:18:07
    —— 引自第38页
  • 初始化实例变量的 init 方法 (查看原文)
    剑底扬程 2012-05-19 16:31:45
    —— 引自第60页
  • 假设该对象计数器为1且已经被设置为自动释放 (查看原文)
    马拉 2012-07-20 23:05:58
    —— 引自第139页
  • * If you access an instance variable by reference, self (the objective performing the method) is retained. * If you access an instance variable by value, the variable by value, the variable is retained. (查看原文)
    粟渺 2012-09-30 17:09:46
    —— 引自第244页
  • 应该向下面这样嵌套调用alloc和init方法: Car *car = [[Car alloc] init]; 而不是像这样: Car *car = [Car alloc]; [car init]; 这种嵌套调用技术非常重要,因为初始化方法返回的对象可能与分配的对象不同。 (查看原文)
    Stanley_Wang 2013-02-23 20:58:47
    —— 引自第143页