Say you have a class, and you want to expose an interface that others can use for subclassing. Here is how you do it.

Define your class, and then define what looks like the same interface x2, only on the second one expose the methods you want to subclass. Like this.


@interface AppRemoteStreamTransport : NSObject<NSStreamDelegate>

///Subclassing support
@interface AppRemoteStreamTransport ()
- (void)streamDidOpen:(NSStream *)stream;
- (void)streamDidReachEnd:(NSStream *)stream;