我想让在我的 RootView 中显示表格上方的 UIImage 很高兴。我怎样才能做到这一点?
问问题
156 次
1 回答
0
您应该使用setBackgroundView方法。
一个小例子:
// my image
UIImage *image = [[[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"my_image" ofType:@"png"]] autorelease];
// an imageView to put the imagen on
UIImageView *imageView = [[[UIImageView alloc] initWithImage:image] autorelease];
// we set the background of the table with the imageView
[myTable setBackgroundView:imageView];
于 2011-03-09T16:18:21.207 回答