All instance variables within the scope of the class are also within the scope of the category. That includes all instance variables declared by the class, even ones declared @private.
Therefore, I can do this (and it works):
@interface MyControl : UISearchDisplayController
{
@private
int privateInteger;
}
@end
@implementation MyControl
@end
@interface MyControl (Private)
@end
@implementation MyControl (Private)
- (void)myMethod
{
privateInteger = 0;
}
@end
But why I cannot do this (I get an undefined symbol link error) :
@interface UISearchDisplayController (MyCategory)
@end
@implementation UISearchDisplayController (MyCategory)
- (void)myMethod
{
_dimmingView = nil;
}
@end
_dimmingView is a private variable in UISearchDisplayController.
Is there a build option that allows me to do that, of which I do not know about?