[英]Setting image to tableview background
我已經在tableview頂部添加了一個imageview。 我需要將其設置為tableview的背面,而無需將其設置為tableview的背景。
sendSubviewToBack:bgView
也不起作用。 有人可以幫忙嗎?
這樣嘗試,
if objects are in xib ,then take imageview infront of tableview in xib,
(要么)
if you are adding in programatically then add imageview before adding the tableview
(要么)
table.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@""]];
(要么)
[table bringSubviewToFront:yourImageview];
嘗試這個
self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"table_bg_image.png"]];
沒有得到你想要的東西。 通過XIB的另一種方法,只需將其添加到table View后面的xib中,然后將tableView的背景色設置為clearcolor,這樣您就可以看到tableview后面的圖像。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.