这是我的代码:
NSString * atime = [NSString stringWithFormat:@"%@",[theDataObject.minuteArray objectAtIndex:indexPath.row]];
NSLog(@"value of atime is:%@",atime);
if (atime==@"0") {
NSString * timeStr = [NSString stringWithFormat:@"%@s",[theDataObject.secondArray objectAtIndex:indexPath.row]];
cell.timeLabel.text = timeStr;
}
else {
NSString * timeStr = [NSString stringWithFormat:@"%@m%@s",[theDataObject.minuteArray objectAtIndex:indexPath.row],[theDataObject.secondArray objectAtIndex:indexPath.row]];
cell.timeLabel.text = timeStr;
}
但它永远不会返回第一个语句只返回第二个语句,即使是 atim 值是 0。
日志值:
MyAudioRecorder[2484:10703] value of atime is:0
也试过把 0 代替 @"0",还是不行。