我想让我的RootView在桌子上方显示一个UIImage。我该怎么做呢?
发布于 2011-03-10 00:18:21
您应该使用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];https://stackoverflow.com/questions/5246453
复制相似问题