iphone定时器plist文件显示



我要再问一次这个问题,我以为我已经想明白了,但我想没有。这是一个计时器应用程序,它从plist文件中获取计时器信息。一切正常,但我希望.plist扩展名不要显示在我的表视图中。以下是两个我认为是问题所在的代码片段。它们在一个名为NSArray *files; 的阵列中

self.files = [[NSBundle mainBundle] pathsForResourcesOfType:@"plist" inDirectory:@"Timers1"];
// Configure the cell.
cell.textLabel.text = [[files objectAtIndex:indexPath.row] lastPathComponent];
return cell;

感谢的帮助

NSString *text = [[files objectAtIndex:indexPath.row] lastPathComponent];
text = [text substringToIndex:[text rangeOfString:@"."].location];
cell.textLabel.text = text;

最新更新