我有一个UITableView有五个部分.正如标题描述的那样,仅为前四个调用了cellForRowAtIndexPath.已经建立了有关数据源和委托的所有连接.此外,我的numberOfSectionsInTableView清楚地返回5.打印出cellForRowAtIndexPath中的部分数量显示正确的数字,从而确认不会为所有部分调用cellForRowAtIndexPath.到底是怎么回事?我很难找到这个问题的答案,但找不到答案.如果已经回答,请原谅我并指出正确的方向.
我的cellForRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [theTableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
switch (indexPath.section) {
case 0:
cell.textLabel.text = ticket.description;
break;
case 1:
cell.textLabel.text = ticket.ticketStatus;
break;
case 2:
cell.textLabel.text = ticket.priority;
break;
case 3:
cell.textLabel.text = ticket.customerOfficePhone;
break;
case 4: {
//This never ever gets executed
Comment *comment = [ticket.comments objectAtIndex:indexPath.row];
cell.textLabel.text = comment.commentContent;
break;
}
}
return cell;
} …Run Code Online (Sandbox Code Playgroud) 我正在尝试在DrRacket中开始编写方案.我让DrRacket工作了很短的时间,然后我起身去喝咖啡,回来后现在它不会启动.当我点击DrRacket.exe时,它不会显示DrRacket用户界面,而是显示一个带有以下文本的控制台框:
read-bitmap: expects type <path-string or input-port> as 1st argument, given: '#
(#<procedure:draw-honu> 270 270); other arguments were: 'unknown/alpha #f #t
[退出.关闭框或Ctrl-C关闭控制台.]
我尝试重新安装没有成功.我也确保我有64位版本而不是32位版本.