我在 appdelegate 类中创建了一个方法,它是-
@implementation UINavigationBar (category)
- (void)drawRect:(CGRect)rect{
UIImage *img = [UIImage newImageFromResource:@"Img.png"];
[img drawInRect:rect];
[img release];
}
@end
我想在其他一些类中以编程方式设置图像(Img.png)的大小(x,y,宽度,高度)..所以如何调用/使用(-(void)drawRect:(CGRect)rect)方法其他类?