I've got a fairly complicated protocol which I'm adding methods to. Most of the new methods are @optional
, but they are paired.
For example, these two methods work together:
@optional
- (BOOL) shouldIDoSomethingHere;
- (CGPoint) whereShouldIDoIt;
In this example, if the first method is implemented, I want to declare the second method as @required
, otherwise both are optional. What I want is a way to nest or group protocol methods as either all required or not based on context.
Ideally something like:
@optional
@required
- (BOOL) shouldIDoSomethingHere;
- (CGPoint) whereShouldIDoIt;
@endRequired
//... next optional method