試しましたCategoriesか?このチュートリアルをチェックしてくださいhttp://iphone-obsessed.blogspot.com.br/2010/05/tutorial-creating-class-categories-in.html
もっと情報を提供できますか?多分あなたがより多くの情報を提供すれば、私はあなたをもっと助けることができます
編集
どのようCategoriesに仕事:
クラスがUIViewあり、何度も繰り返すいくつかのメソッドを使用したい場合。あなたは何をしますか:次のように、のカテゴリを作成し、UIViewこのメソッドをカテゴリに追加します。
ファイルUIView+CustomView.h
#import <UIKit/UIKit.h>
@interface UIView (CustomView)
- (void)myCustomMethod;
@end
ファイルUIView+CustomView.m
#import "UIView+CustomView.h"
@implementation UIView (CustomView)
- (void)myCustomMethod {
// Whatever you want to do with this UIView
}
@end
を使用する必要があるたびに、myCustomMethodインポートするだけで、そのクラス内UIView+CustomView.hのすべてのUIViewオブジェクトがこのメソッドにアクセスできます。
このような:
ファイルMainViewController.m、ヘッダー:
#import "UIView+CustomView.h"
file MainViewController.m、 body 、任意のメソッド内:
[myView myCustomMethod];
これを念頭に置いてACMagnifyingView、カスタムビューを使用するためにサブクラスとこのカテゴリを追加できると思います