How can I make a subclass of NSInputStream?

前端 未结 2 1676
情书的邮戳
情书的邮戳 2021-01-19 09:06

I\'d like to make a subclass of NSInputStream. Simply, I tried to code just like the following,

@interface SeekableInputStream : NSInputStream
{
    NSUInteg         


        
2条回答
  •  爱一瞬间的悲伤
    2021-01-19 09:55

    If you check out NSStream.h in the SDK, initWithURL is defined not in the core class NSInputStream but in a category called NSInputStreamExtensions. I don't know much about calling methods defined in a category of a base class from an inherited class, but this definitely can be the cause of the visibility problem you experience.

提交回复
热议问题