Take your coding skills to the next level with this extensive guide to Objective--C, the native programming language for developing sophisticated software applications for Mac OS X. Objective--C is a powerful, object--oriented extension of C, making this book the perfect follow--up to Dave Mark's bestselling Learn C on the Mac, Mac OS X Edition. Whether you're an experienced C ...
Take your coding skills to the next level with this extensive guide to Objective--C, the native programming language for developing sophisticated software applications for Mac OS X. Objective--C is a powerful, object--oriented extension of C, making this book the perfect follow--up to Dave Mark's bestselling Learn C on the Mac, Mac OS X Edition. Whether you're an experienced C programmer or you're coming from a different language such as C++ or Java, leading Mac experts Mark Dalrymple and Scott Knaster show you how to harness the powers of Objective--C in your applications! * A complete course on the basics of Objective--C using Apple's free Xcode tools * An introduction to object--oriented programming * Comprehensive coverage of inheritance, composition, object initialization, categories, protocols, memory management, and organizing source files * A brief tour of Cocoa's foundation framework and AppKit * A helpful "learning curve" guide for non--C developers What you'll learn * Learn Objective--C programming, the gateway to programming your Mac or iPhone * Write applications for the Mac OS X interface, the cleanest user--interface around * Understand variables and how to design your own data structures * Work with the file system * Connect to data sources and the Internet Who this book is for For anyone wanting to learn to program native applications in Mac OS X, including developers new to the Mac, developers new to Objective--C, or students entirely new to programming.
作者简介
· · · · · ·
Mark Dalrymple ,有多年从业经验的 Mac 和 Unix 程序员,致力于跨平台开发工具包、因特网发布工具、高性能 Web 服务和终端用户桌面应用等方面的工作。他还与人合著过 Core Mac OS X and Unix Programming 和 Advanced Mac OS X Programming 。
Scott Knaster ,资深 Mac 开发人员。他在 17 年前写就的经典著作 How to Write Macintosh Software 至今仍是 Mac 程序员必读图书。他还撰写过 Take Control of Switching to the Mac 和 Macintosh Programming Secrets 等多部畅销书。
1小时前买到的,翻看了一下目录。把property翻译成"特性"。麻烦各位出版商负责一点,不要找外行来翻译,很多技术名词按照惯例都有对应的中文翻译。 原书的英文版"Learn Objective-C on the Mac"在网上可以找到,看了几十页貌似可读性也还可以。 先忍着看看吧,市面上几本关于...
(展开)
* 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. NSString *string1 = ^{ return [_theString stringByAppendingString:_theString]; }; 这一段说与块声明在同一个类中的实例变量__theString在block中被直接使用的,所以包含它的对象(self)的引用计数是增加1...
2012-09-30 17:09
* 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.引自 Blocks and Concurrency ->You are too old to play Blocks -> Objective-C Objects
Cocoa 内存管理原则 * 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 aut...
2012-03-07 16:05
Cocoa 内存管理原则
* 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.引自第172页
NSArray的三种遍历方式: 1. Objective-C 2.0的特性,Mac OS X 10.5 之后才支持,速度最快,推荐 for (NSString *string in array) { NSLog (@"I found %@", string); } 2. 程序必须支持Mac OS X 10.4时采用,Xcode 有转化代码为obj-c2.0的工具,可自动转化为第一种方式 NSEnumerator *enumerator; enumerator = [array objectEnumerator]; id thingie; while (thingie = [enumerator nextObject]) { NSLog (@"I found %@", thin...
2012-03-06 15:08
NSArray的三种遍历方式:
1. Objective-C 2.0的特性,Mac OS X 10.5 之后才支持,速度最快,推荐
for (NSString *string in array) {
NSLog (@"I found %@", string);
}
2. 程序必须支持Mac OS X 10.4时采用,Xcode 有转化代码为obj-c2.0的工具,可自动转化为第一种方式
NSEnumerator *enumerator;
enumerator = [array objectEnumerator];
id thingie;
while (thingie = [enumerator nextObject]) {
NSLog (@"I found %@", thingie);
}
3. 下标访问方式
int i;
for (i = 0; i < [array count]; i++) {
NSLog (@"index %d has %@.",
i, [array objectAtIndex: i]);
}
Bertrand Meyer’s Open/Closed Principle: software entities should be open for extension but closed for modification. "开-闭原则" 一个软件实体应当对扩展开放,对修改关闭.也就是说,我们在设计一个模块的时候,应当使这个模块可以在不被修改的前提下被扩展,换句话说就是,应当可以在不必修改源代码的情况下改变这个模块的行为.
2012-03-02 17:46
Bertrand Meyer’s Open/Closed Principle:
software entities should be open for extension but closed for modification.
"开-闭原则"
一个软件实体应当对扩展开放,对修改关闭.也就是说,我们在设计一个模块的时候,应当使这个模块可以在不被修改的前提下被扩展,换句话说就是,应当可以在不必修改源代码的情况下改变这个模块的行为.
Bertrand Meyer’s Open/Closed Principle: software entities should be open for extension but closed for modification. "开-闭原则" 一个软件实体应当对扩展开放,对修改关闭.也就是说,我们在设计一个模块的时候,应当使这个模块可以在不被修改的前提下被扩展,换句话说就是,应当可以在不必修改源代码的情况下改变这个模块的行为.
2012-03-02 17:46
Bertrand Meyer’s Open/Closed Principle:
software entities should be open for extension but closed for modification.
"开-闭原则"
一个软件实体应当对扩展开放,对修改关闭.也就是说,我们在设计一个模块的时候,应当使这个模块可以在不被修改的前提下被扩展,换句话说就是,应当可以在不必修改源代码的情况下改变这个模块的行为.
NSArray的三种遍历方式: 1. Objective-C 2.0的特性,Mac OS X 10.5 之后才支持,速度最快,推荐 for (NSString *string in array) { NSLog (@"I found %@", string); } 2. 程序必须支持Mac OS X 10.4时采用,Xcode 有转化代码为obj-c2.0的工具,可自动转化为第一种方式 NSEnumerator *enumerator; enumerator = [array objectEnumerator]; id thingie; while (thingie = [enumerator nextObject]) { NSLog (@"I found %@", thin...
2012-03-06 15:08
NSArray的三种遍历方式:
1. Objective-C 2.0的特性,Mac OS X 10.5 之后才支持,速度最快,推荐
for (NSString *string in array) {
NSLog (@"I found %@", string);
}
2. 程序必须支持Mac OS X 10.4时采用,Xcode 有转化代码为obj-c2.0的工具,可自动转化为第一种方式
NSEnumerator *enumerator;
enumerator = [array objectEnumerator];
id thingie;
while (thingie = [enumerator nextObject]) {
NSLog (@"I found %@", thingie);
}
3. 下标访问方式
int i;
for (i = 0; i < [array count]; i++) {
NSLog (@"index %d has %@.",
i, [array objectAtIndex: i]);
}
Cocoa 内存管理原则 * 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 aut...
2012-03-07 16:05
Cocoa 内存管理原则
* 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.引自第172页
* 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. NSString *string1 = ^{ return [_theString stringByAppendingString:_theString]; }; 这一段说与块声明在同一个类中的实例变量__theString在block中被直接使用的,所以包含它的对象(self)的引用计数是增加1...
2012-09-30 17:09
* 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.引自 Blocks and Concurrency ->You are too old to play Blocks -> Objective-C Objects
Cocoa 内存管理原则 * 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 aut...
2012-03-07 16:05
Cocoa 内存管理原则
* 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.引自第172页
NSArray的三种遍历方式: 1. Objective-C 2.0的特性,Mac OS X 10.5 之后才支持,速度最快,推荐 for (NSString *string in array) { NSLog (@"I found %@", string); } 2. 程序必须支持Mac OS X 10.4时采用,Xcode 有转化代码为obj-c2.0的工具,可自动转化为第一种方式 NSEnumerator *enumerator; enumerator = [array objectEnumerator]; id thingie; while (thingie = [enumerator nextObject]) { NSLog (@"I found %@", thin...
2012-03-06 15:08
NSArray的三种遍历方式:
1. Objective-C 2.0的特性,Mac OS X 10.5 之后才支持,速度最快,推荐
for (NSString *string in array) {
NSLog (@"I found %@", string);
}
2. 程序必须支持Mac OS X 10.4时采用,Xcode 有转化代码为obj-c2.0的工具,可自动转化为第一种方式
NSEnumerator *enumerator;
enumerator = [array objectEnumerator];
id thingie;
while (thingie = [enumerator nextObject]) {
NSLog (@"I found %@", thingie);
}
3. 下标访问方式
int i;
for (i = 0; i < [array count]; i++) {
NSLog (@"index %d has %@.",
i, [array objectAtIndex: i]);
}
Bertrand Meyer’s Open/Closed Principle: software entities should be open for extension but closed for modification. "开-闭原则" 一个软件实体应当对扩展开放,对修改关闭.也就是说,我们在设计一个模块的时候,应当使这个模块可以在不被修改的前提下被扩展,换句话说就是,应当可以在不必修改源代码的情况下改变这个模块的行为.
2012-03-02 17:46
Bertrand Meyer’s Open/Closed Principle:
software entities should be open for extension but closed for modification.
"开-闭原则"
一个软件实体应当对扩展开放,对修改关闭.也就是说,我们在设计一个模块的时候,应当使这个模块可以在不被修改的前提下被扩展,换句话说就是,应当可以在不必修改源代码的情况下改变这个模块的行为.
0 有用 璞笛 2012-07-09
so so
0 有用 froo 2011-02-17
循循善诱,老适合基础不好的人了~
0 有用 curly 2010-09-06
熟悉obj-c的工具
0 有用 PencilStart 2012-06-03
A wonderful book that is the first step into the door of APPLE DEVELOPING WORLD.
0 有用 胖胖的大头鱼 2009-12-23
入门教材,需要c基础
0 有用 0oneo 2013-04-27
一天看完的,之前看过相关的书,最后三章关于 property list、archive、nspredicate 讲得不错,这本书解决了关于designated initializer的困惑
0 有用 曹磊 2013-03-19
有点老
0 有用 远方的落日 2012-10-17
曾完整地读过一遍,觉得还是写得蛮不错的,虽然有些欠缺的地方,如果作者能够更新一下出第二版会更好。
0 有用 粟渺 2012-10-05
对于有一定编程基础的童鞋们来说,利用这本书来迈入ObjectiveC的大门是一个很不错的选择。PS:要看英文原版不要看中文翻译的。。。
0 有用 liuliu 2012-07-12
建议读英文原版