开发者

UITableView background now scrolling with cells?

I've noticed something: I've an UITableViewController with a custom background, set this way:

UIImage *backgroundImage = [UIImage imageNamed:@"background.png"];
self.view.backgroundColor = [UIColor colorWithPatternImage:backgroundImage];

On iPhone Simulator 4.1, the background shows correctly, fixed and never moving... But when I use iPhone Simulator 4.2 or 4.3, the background is scrolling with the cells ! I s开发者_JAVA技巧uppose this is a change made by Apple on iOS 4.2, but how to avoid this ?


Setting the backgroundView of the tableView to a UIImageView results in an image that remains in a fixed position.

UIImageView *backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"background"]];
self.tableView.backgroundView = backgroundImageView;
[backgroundImageView release];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜