Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

< 前ページ次ページ >

カテゴリと拡張

カテゴリを使用して、メソッドを既存のクラスに(自分がソースを持っていないクラス)追加できます。これは、サブクラス化を行わずに既存のクラスの機能を拡張できる強力な機能です。カテゴリを使用すれば、自身のクラスの実装を複数のファイル間で分けることもできます。クラス拡張も同様ですが、追加の必須APIをプライマリクラスの@interfaceブロック内を除く場所でクラスに宣言できます。

目次:

メソッドのクラスへの追加
カテゴリの使い方
ルートクラスのカテゴリ
拡張




< 前ページ次ページ >


Last updated: 2007-10-31




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice