相关疑难解决方法(0)

我的UITableView不会向下滚动数据的末尾!为什么?

好吧我不知道为什么这不起作用,但我已经连接了一个tableView,我想要为每个单元格设置19项文本.

单元格填充得很好,但是当我尝试滚动时,它会向下移动,我可以看到在初始视图中看不到的单元格,它会挂起,并且不会向下滚动.它只是快速回复.真的很奇怪!

我究竟做错了什么?

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
}


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


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

static NSString *CellIdentifier = @"Cell";

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

// Configure the cell...
if(indexPath.row == 0){
    cell.textLabel.text = …
Run Code Online (Sandbox Code Playgroud)

iphone scroll datasource uitableview ipad

15
推荐指数
3
解决办法
2万
查看次数

标签 统计

datasource ×1

ipad ×1

iphone ×1

scroll ×1

uitableview ×1