Iphone UITableView的背景?
如何在UITableView中显示背景图像,如Iphone UITableView的背景?,iphone,xcode,uitableview,Iphone,Xcode,Uitableview,如何在UITableView中显示背景图像,如 请帮帮我。谢谢您将UIImageView添加到视图中,在该位置的UITableView上,并将背景色设置为clearcolor。将UIImageView添加到视图中,在该位置的UITableView上,并将背景色设置为clearcolor。使用此选项 UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cloud.png"] ]; sel
请帮帮我。谢谢您将UIImageView添加到视图中,在该位置的UITableView上,并将背景色设置为clearcolor。将UIImageView添加到视图中,在该位置的UITableView上,并将背景色设置为clearcolor。使用此选项
UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cloud.png"] ];
self.tableView.backgroundView = imageView;
[imageView release];
self.tableView.backgroundColor = [UIColor clearColor];
用这个
UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cloud.png"] ];
self.tableView.backgroundView = imageView;
[imageView release];
self.tableView.backgroundColor = [UIColor clearColor];
您也可以直接设置背景色:
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.jpg"]];
您也可以直接设置背景色:
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image.jpg"]];
您还可以使用
-[uicolorWithPatternImage:UIImage]将图像指定给单个单元格的背景代码>@TheBlack,只有当图像可以自己重复时才能正常工作。您还可以使用-[uicolorWithPatternImage:UIImage]将图像分配到单个单元格的背景中代码>@TheBlack,只有当图像可以自己重复时才能正常工作。