开发者

UIImageView in RootView

开发者 https://www.devze.com 2023-02-15 23:00 出处:网络
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.

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

精彩评论

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