I have created a category for UINavigationBar with the following code:
// UINavigationBar+MyNavigationBar.m
@interface UINavigationBar (MyNavigationBar)
@end
@implementation UINavigationBar (MyNavigationBar)
- (void)drawRect:(CGRect)rect
{
UIImage *img = [UIImage imageNamed: @"header.png"];
[img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
I have not #import anywhere, in any of the code in my entire project, however, this category is still running and inserting the header graphic. How is this possible?