0
我有一個tableview節標題,爲此我想添加一個自定義視圖。當桌面視圖加載時,它顯示爲黑色,如下所示:http://postimage.org/image/luluolc57/當我開始滾動時,標題「粘」到屏幕/導航欄的頂部,它就變成我想要的樣子 - 這裏顯示的是http://postimage.org/image/lek98nxud/自定義Tableview節標題全部是黑色
基本上,我希望這個視圖對這個灰色圓圈透明,所以桌面視圖背景會顯示出來。這裏是相應的代碼。
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
return [[SummaryView alloc] init];
}
- (void)drawRect:(CGRect)rect
{
CGRect tintSize = CGRectMake(0.0, 0.0, self.bounds.size.height, self.bounds.size.height);
[[UIImage imageNamed:@"Circular Tint.png"] drawInRect:tintSize];
}
你的UITableViewDataSource/UITableViewDelegate實現的其餘部分是什麼樣的?我有預感,但想看更多。 –