How to hide the class' properties and methods when defining and using one protocol in the .h file for Objective-C?

81 Views Asked by At

For example: my .h file is like below:

// .h file
@protocol pageUpdateDelegate
-(void)pageUpdateMethod2;
@end

@interface ClassA
@property (nonatomic) NSInteger page;
-(void)pageUpdateMethod1;
@end

I want to provide this pageUpdateDelegate protocol to other people. However, I don't want my ClassA's property and method been revealed and used by others. But I will definitely use the ClassA a lot. Then how can I do to protect my property and methods in the .h file? I just want others to use the protocol part. Thanks.

0

There are 0 best solutions below