相关疑难解决方法(0)

为什么我的UITableView顶部有额外的填充,iOS7中的样式为UITableViewStyleGrouped

从iOS7开始,我的顶部UITableView有一个额外的空间,有一个风格UITableViewStyleGrouped.

这是一个例子:

在此输入图像描述

tableview从第一个箭头开始,有35个像素的无法解释的填充,然后绿色标题是UIView返回的viewForHeaderInSection(其中该部分为0).

任何人都可以解释这个35像素的数量来自何处以及如何在不切换的情况下摆脱它UITableViewStylePlain

uitableview ios ios7

616
推荐指数
38
解决办法
24万
查看次数

当节为空时,分组的UITableView显示空白区域

我有一个分组的UITableView,其中并非所有部分都可以一次显示,该表由一些数据驱动,而不是每个记录都有.我的麻烦是,没有某些部分的记录在表格中显示为空白(见图)

替代文字http://img220.imageshack.us/img220/5633/screenshot20100322at228.png

没有页脚/标题.我错过了什么?

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [self getRowCount:section];
}


// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}

cell.textLabel.text = [NSString stringWithFormat:@"section: %d row: %d",indexPath.section,indexPath.row];
// Configure the cell...

return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

    float …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c uitableview

24
推荐指数
4
解决办法
1万
查看次数

UITableView部分标题高度为非分组表

问候!我知道UITableView sectionHeaderHeight仅用于分组表,但无论如何我都会问(如果有一些方法可以做到这一点并不明显)...

有没有办法更改NON -grouped表的节标题高度(以及它,字体/大小)?

希望"是"或至少是"可能"......但担心这可能是"不".有人,伙计们.

height header uitableview iphone-sdk-3.0

21
推荐指数
1
解决办法
3万
查看次数

标签 统计

uitableview ×3

header ×1

height ×1

ios ×1

ios7 ×1

iphone ×1

iphone-sdk-3.0 ×1

objective-c ×1