UITableViewの背景に画像を使う方法がわからなくて
いろいろ挑戦してみたら、下の方法を利用するとうまくいった。
UITableVIewの背景を透明化してから背景をはめ込むイメージかんじなのかな?
- - (void)viewDidLoad {
- [super viewDidLoad];
- //リストの背景透明化
- [self.tableView setBackgroundView:nil];
- [self.tableView setBackgroundView:[[[UIView alloc] init] autorelease]];
- self.tableView.backgroundColor = [UIColor clearColor];
- //背景画像指定
- UIColor *col = [[UIColor alloc]
- initWithPatternImage:[UIImage imageNamed:@"background.jpg"]];
- [self.tableView setBackgroundColor:col];
- [col release];
- }
0 件のコメント:
コメントを投稿