我用tableHeaderView有一個簡單的uitableview。我有不止一節。是否可以使uitableheader通過第一個表格單元?
我設置了headerview的高度30.但我想在我的標題中使用40像素高度uiview(從0,0到320,30不透明,從30,10到320,40是透明的)。我在裏面放了一張照片。點(0x30)上有一個小圖標。它的高度= 10。 我只想在第一個tablecell上顯示我的headerview。
你會在下面看到我設置標題的高度爲30,但我在viewForHeaderInSection中創建了40像素高度的視圖。
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 30;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *sectionView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 40)];
sectionView.backgroundColor = [UIColor redColor];
[sectionView autorelease];
return sectionView;
}
是否有可能?
那麼,這是不可能的? – fulberto100 2011-04-27 10:01:08
迄今爲止,我的知識是不可能的,除非有人想出了一個沒有找到的扭曲解決方法。 – 2011-04-27 11:48:58