UIImageView in RootView
I would like to let display gladly in my RootView a UIImage above the 开发者_如何学Ctable. How can I make that?
You should use the setBackgroundView method.
A little example:
// 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];
精彩评论