开发者

back ground for grouped uitableview in iphone sdk

开发者 https://www.devze.com 2023-01-13 19:24 出处:网络
a new problem has crept up for me.I want to set an image as a table\'sbackground.Its a grouped table view.im doing this using IB.

a new problem has crept up for me.I want to set an image as a table's background.Its a grouped table view.im doing this using IB.

i set the background color property for the table view as clearcolor and placed tan image view in the view on which the table view is placed./it looks good on ib,but when the application is loaded the 开发者_如何学运维table has a white background.

im going nuts.:-(Help


Are you using a UINavigationController? If yes, I use this code:

self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.navigationController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"nameOfYourImage.png"]];

I placed this code in the viewDidLoad method.

0

精彩评论

暂无评论...
验证码 换一张
取 消