既存のクラスを拡張したいときに、 Objective-C であれば Category 、 Swift であれば Extension により実装していきます。 それぞれの実装方法の例です。 Objective-C NSDate を拡張して sampleMethod というメソッドを実装したい場合、 Objective-C では以下のように記述します。 // NSDate+SampleProject.h #import <Foundation/Foundation.h> @interface NSDate (SampleProject) - (void)sampleMethod; @end // NSDate+SampleProject.m @implementation - (void)sampleMethod { // hoge } @end Swift 上記と同じメソッドを Swift