Is there any way to hide protocol conforming from an end user? I'll try to describe in details what I want. I have class let's call it EndUserClass which conforms some protocol let's say HiddenClassDelegate and this protocol I'd like to hide from end user. The code looks like as it follows:
@interface EndUserClass : NSObject <HiddenClassDelegate>
{
// .....
}
@end
and I want to keep the same functionality with the following declaration:
@interface EndUserClass : NSObject
{
// .....
}
@end
Is there any way to conform the protocol privately? I know that I can skip delegate in class declaration but it gives compiler warning which I don't want to have
You can do that by declaring custom class category in implementation file:
// .m file
@interface EndUserClass() <HiddenClassDelegate>
@end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With