{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Effective Objective-C 2.0:编写高质量iOS与OS X代码的52个有效方法(英文版)

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Effective Objective-C 2.0:编写高质量iOS与OS X代码的52个有效方法(英文版)

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Content Description

《Effective Objective-C 2.0:编写高质量iOS与OS X代码的52个有效方法 英文版》不是在讲Objective-C语言的基础知识,而是要讲如何高效运用这门语言。《Effective Objective-C 2.0:编写高质量iOS与OS X代码的52个有效方法 英文版》共分7章,从7个方面总结和探讨了Objective-C编程中52个鲜为人知又容易被忽视的特性。第1章从整体上讲解Objective-C的核心概念;第2章讲述了与面向对象语言的重要特征(对象、消息和运行期)相关的行为;第3章介绍了如何编写适合与Objective-C搭配的类;第4章讲述协议与分类相关的技巧;第5章介绍内存管理的注意事项;第6章介绍块与大中枢派发(GrandCentralDispatch)相关的技巧;第7章总览了Cocoa和CocoaTouch系统框架,并深入研究了其中的某些类。

Author Description

Matt Galloway,是英国伦敦的一名 iOS 开发人员。他在 2007 年毕业于剑桥大学彭布鲁克学院,获得工学硕士学位,研究方向是电子信息科学。自那时起,他一直从事编程,主要使用 Objective-C。从 iOS 发布 SDK 开始,他一直在 iOS 上进行开发。他的 Twitter 账号是 @mattjgalloway,常常在 Stack Overflow上回答问题。

Catalogue

前言
致谢
关于作者
Chapter 1: Accustoming Yourself to Objective-C
Item 1: Familiarize Yourself with Objective-C’s Roots
Item 2: Minimize Importing Headers in Headers
Item 3: Prefer Literal Syntax over the Equivalent Methods
Item 4: Prefer Typed Constants to Preprocessor #define
Item 5: Use Enumerations for States, Options, and Status Codes
Chapter 2: Objects, Messaging, and the Runtime
Item 6: Understand Properties
Item 7: Access Instance Variables Primarily Directly When
Accessing Them Internally
Item 8: Understand Object Equality
Item 9: Use the Class Cluster Pattern to Hide Implementation Detail
Item 10: Use Associated Objects to Attach Custom Data to Existing Classes
Item 11: Understand the Role of objc_msgSend
Item 12: Understand Message Forwarding
Item 13: Consider Method Swizzling to Debug Opaque Methods
Item 14: Understand What a Class Object Is
Chapter 3: Interface and API Design
Item 15: Use Prefix Names to Avoid Namespace Clashes
Item 16: Have a Designated Initializer
Item 17: Implement the description Method
Item 18: Prefer Immutable Objects
Item 19: Use Clear and Consistent Naming
Item 20: Prefix Private Method Names
Item 21: Understand the Objective-C Error Model
Item 22: Understand the NSCopying Protocol
Chapter 4: Protocols and Categories
Item 23: Use Delegate and Data Source Protocols for Interobject Communication
Item 24: Use Categories to Break Class Implementations into Manageable Segments
Item 25: Always Prefix Category Names on Third-Party Classes
Item 26: Avoid Properties in Categories
Item 27: Use the Class-Continuation Category to Hide Implementation Detail
Item 28: Use a Protocol to Provide Anonymous Objects
Chapter 5: Memory Management
Item 29: Understand Reference Counting
Item 30: Use ARC to Make Reference Counting Easier
Item 31: Release References and Clean Up Observation State Only in dealloc
Item 32: Beware of Memory Management with Exception-Safe Code
Item 33: Use Weak References to Avoid Retain Cycles
Item 34: Use Autorelease Pool Blocks to Reduce High-Memory Waterline
Item 35: Use Zombies to Help Debug Memory-Management Problems
Item 36: Avoid Using retainCount
Chapter 6: Blocks and Grand Central Dispatch
Item 37: Understand Blocks
Item 38: Create typedefs for Common Block Types
Item 39: Use Handler Blocks to Reduce Code Separation
Item 40: Avoid Retain Cycles Introduced by Blocks Referencing the Object Owning Them
Item 41: Prefer Dispatch Queues to Locks for Synchronization
Item 42: Prefer GCD to performSelector and Friends
Item 43: Know When to Use GCD and When to Use Operation Queues
Item 44: Use Dispatch Groups to Take Advantage of Platform Scaling
Item 45: Use dispatch_once for Thread-Safe Single-Time Code Execution
Item 46: Avoid dispatch_get_current_queue
Chapter 7: The System Frameworks
Item 47: Familiarize Yourself with the System Frameworks
Item 48: Prefer Block Enumeration to for Loops
Item 49: Use Toll-Free Bridging for Collections with Custom Memory-Management Semantics
Item 50: Use NSCache Instead of NSDictionary for Caches
Item 51: Keep initialize and load Implementations Lean
Item 52: Remember that NSTimer Retains Its Target
Index
Introduction

经常听到有人抱怨 Objective-C 这门语言的冗长、笨拙、别扭,但我却认为它优雅、灵活又漂亮。然而,为了领略这些优点,我们不仅要掌握基础知识,还要理解该语言的特性、陷阱及繁难之处。这正是本书要讲述的内容。
关于本书
本书假定读者已经熟悉了 Objective-C 的语法,所以不再对其赘述。本书要讲的是怎样完全发挥这门语言的优势,以编写出良好的代码。由于 Objective-C 源自 Smalltalk,所以它是一门相当动态的语言。在其他语言中,许多工作都由编译器来完成;而在 Objective-C 中,则要由“运行时”(runtime)执行。于是,某个函数即使在测试环境下能正常运行,到了工作环境中也可能会因为处理了无效数据而不能正确执行。避免此类问题的最佳方案,当然是一开始就把代码写好。
严格地说,本书中的许多话题与 Objective-C 的核心部分并无关联。本书要谈到系统库中的技术,例如 libdispatch 库的“大中枢派发”(Grand Central Dispatch)等。因为当前所说的 Objective-C 开发就是指开发 Mac OS X 或 iOS 应用程序,所以,书中也要提及Foundation 框架中的许多类,而不仅仅是其基类 NSObject。不论开发 Mac OS X 程序还是iOS 程序,都无疑会用到系统框架,前者所用的各框架统称为 Cocoa,后者所用的框架则叫作 Cocoa Touch。
随着 iOS 的兴起,许多开发者都加入了 Objective-C 开发的队伍。有的程序员初学编程,有的具备 Java 或 C++ 基础,还有的则是网页开发者出身。无论是哪种,为了能高效运用Objective-C,你都必须花时间研究这门语言,才可能写出更高效、更易于维护、更少 bug 的代码来。
尽管本书的内容只花了 6 个月时间就写好了,但是其酝酿过程却长达数年。几年前的一天,我一时兴起,买了个 iPod Touch;然后等到第一版 SDK 发布之后,我决定试着开发一个程序。我做的第一个“应用程序”叫“Subnet Calc”,其下载量比预想中要多。那时候我感觉到自己以后要和这个美妙的语言结缘了。从此我就一直研究 Objective-C,并定期在自己的网站 www.galloway.me.uk 上发表博客。我对该语言的内部工作原理,如块(block)、自动引用计数(Auto Reference Count,ARC)等特别感兴趣。于是,在有机会写一本讲解Objective-C 的书时,我自然就抓住了机会。
为提升本书的阅读效果,我鼓励大家跳跃阅读,直接翻到最感兴趣或与当前工作有关的章节来看。可以分开阅读每条技巧,也可以按其中所引用的条目跳至其他话题,互相参照。我将各类相关技巧归并成章,所以读者可以根据各章标题快速找到关于某个语言特性的技巧。
本书目标读者
本书面向那些有志于深入研究 Objective-C 的开发者,帮助其编写更便于维护、更高效且更少 bug 的代码。如果你目前还不是 Objective-C 程序员,但是会使用 Java 或 C++ 等其他面向对象的语言,那么你仍可阅读此书,不过你需要先了解一下 Objective-C 的语法。
本书主要内容
本书不打算讲 Objective-C 语言的基础知识,你可以在许多教材和参考资料中找到这些内容。本书要讲的是如何高效运用这门语言。书中内容分为若干条目,每条都是一小块易于理解的文字。这些条目按其所谈话题有逻辑地组织为如下各章。
第 1 章:熟悉 Objective-C(Accustoming Yourself to Objective-C)
从整体上讲解该语言的核心概念。
第 2 章:对象、消息和运行时(Objects, Messaging, and the Runtime)
面向对象语言的一个重要特征是,对象之间能够关联与交互。本章讲述了这些特征,并深入研究代码在运行时的行为。
第 3 章:接口与 API 设计(Interface and API Design)
很少有那种写完就不再复用的代码。即使代码不向更多人公开,也依然有可能用在自己的多个项目中。本章讲解如何编写适合与 Objective-C 搭配的类。
第 4 章:协议与分类(Protocols and Categories)
协议与分类是两个需要掌握的重要语言特性。若运用得当,则可令代码易读、易维护且少出错。本章将帮助读者精通这两个概念。
第 5 章:内存管理(Memory Management)
Objective-C 语言以引用计数来管理内存——许多初学者对此感觉很别扭;如果之前使用的语言以垃圾收集器(garbage collector)来管理内存,那么更会如此。“自动引用计数”机制缓解了此问题,不过使用时有很多重要的注意事项,以确保对象模型正确,不致内存泄漏。本章提醒读者注意内存管理中易犯的错误。
第 6 章:块与大中枢派发(Blocks and Grand Central Dispatch)
苹果公司引入了“块”(block)这一概念,其语法类似于C语言扩展中的闭包(closure)。在 Objective-C 语言中,我们通常用块来实现一些之前需要很多样板代码才能完成的事情,块还能实现代码分离(code separation)。大中枢派发(Grand Central Dispatch,GCD)提供了一套用于多线程环境的简单接口。块可视为 GCD 的任务,取决于系统资源状况,这些任务也许能并发执行。本章将教读者如何充分运用这两项核心技术。
第 7 章:系统框架(The System Frameworks)
大家通常会用 Objective-C 来开发 Mac OS X 或 iOS 程序。在这两种情况下都有一套完整的系统框架可供使用,前者名为 Cocoa,后者名为 Cocoa Touch。本章将总览这些框架,并深入研究其中的某些类。
致谢
在被人问是否愿意写一本关于 Objective-C 的书时,我立刻兴奋了起来。读过了Effective 系列的其他书籍后,我意识到要想写好这本 Objective-C 的书籍可真是个挑战。然而在众人协助之下,这本书终于和大家见面了。
本书中的很多灵感都源自许多专门论述 Objective-C 的精彩博文。所以首先要感谢博文作者 Mike Ash、Matt Gallagher 及“bbum”等人。多年来,这些博客帮助我更深地理解了Objective-C 语言。在编撰本书时,NSHipster 及 Mattt Thompson 所写的优秀文章也启发了我的思路。还要感谢苹果公司提供的极为有用的开发文档。
在供职于 MX Telecom 期间,我学到了许多知识,若没有这段经历,恐怕就无法完成此书了。感谢 Matthew Hodgson,他给了我机会,让我以一套成熟的 C++ 代码库为基础,开发出了公司的第一个iOS应用程序,在该项目中学到的本领为我参与后续项目打下了基础。
感谢历年来保持联系的各位同仁。大家时而切磋技艺,时而把酒言欢,这对我写作本书来说都是一种帮助。
感谢培生集团的编辑团队,与你们的合作相当愉快。Trina MacDonald、Olivia Basegio、Scott Meyers及Chris Zahn都在需要时给予我帮助与鼓励。诸位为我提供了专心写书的工具,并回答了必要的问题。
还要感谢技术编辑们,与你们的合作也非常融洽,你们给了我莫大的帮助。严格的审校帮助本书内容臻于完美。诸位在检查书稿时认真细致的态度也非常令人称赞。
最后我要说,此书能问世,爱妻 Helen 的理解与支持必不可少。准备动笔那天,我们的第一个孩子 Rosie 降生了! Helen 与 Rosie 伴我顺利写完这本书,你们俩真棒!

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book