Define background Image with UIImage
Posted
by
Wohoo Summer
on Stack Overflow
See other posts from Stack Overflow
or by Wohoo Summer
Published on 2012-07-07T15:06:47Z
Indexed on
2012/07/07
15:15 UTC
Read the original article
Hit count: 141
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
?
© Stack Overflow or respective owner