小编You*_*nzr的帖子

UITableViewController背景图片

如何设置图像UITableViewController

我使用了很多东西,但它没有帮助我将图像设置为背景

UIImageView* bgView = [[[UIImageView alloc] initWithImage:
[UIImage imageNamed:@"Default.png"]] autorelease];

[tableView.backgroundView addSubview:bgView];
Run Code Online (Sandbox Code Playgroud)

还有这个

[[self view] setAutoresizesSubviews:NO];

UIView *backgroundView = [[UIView alloc] initWithFrame:self.view.frame];
backgroundView.backgroundColor = 
  [UIColor colorWithPatternImage:
    [UIImage imageNamed:@"Default.png"]];

self.tableView.backgroundView = backgroundView;
self.tableView.backgroundColor = [UIColor clearColor];

[backgroundView release];
Run Code Online (Sandbox Code Playgroud)

self.navigationController.view.backgroundColor = 
  [UIColor colorWithPatternImage:
    [UIImage imageNamed:@"myImage.png"]];
self.tableView.backgroundColor = [UIColor clearColor];
Run Code Online (Sandbox Code Playgroud)

这些都不适合我.

iphone xcode objective-c xcode4 xcode4.2

9
推荐指数
1
解决办法
1万
查看次数

标签 统计

iphone ×1

objective-c ×1

xcode ×1

xcode4 ×1

xcode4.2 ×1