如何设置图像UITableViewController
?
我使用了很多东西,但它不能帮助我将图像设置为背景
UIImageView* bgView = [[[UIImageView alloc] initWithImage:
[UIImage imageNamed:@"Default.png"]] autorelease];
[tableView.backgroundView addSubview:bgView];
And this
[[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];
And
self.navigationController.view.backgroundColor =
[UIColor colorWithPatternImage:
[UIImage imageNamed:@"myImage.png"]];
self.tableView.backgroundColor = [UIColor clearColor];
这些都不适合我。
设置background
填充模式
[youTable setBackgroundView:
[[UIImageView alloc] initWithImage:
[UIImage imageNamed:@"bg.png"]]];
设置background
模式图块
[youTable setBackgroundColor:
[UIColor colorWithPatternImage:
[UIImage imageNamed:@"bg.png"]]];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)