Define background Image with UIImage
- by Wohoo Summer
I am using header file to set the background for my application and I have something like
#define backgroundImage [UIColor colorWithPatternImage:[UIImage imageNamed:@"background.jpeg"]]
but I want use UIImageView instead of UIColor. I know I can do:
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)
[imageView setImage:[UIImage imageNamed:@"background.png"]];
self.tableView.backgroundView = imageView;
but how do I use it with #define?