开发者

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];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜