嗨,当在表视图编辑模式下,不调用didselectrowatindexpath函数.这是我的代码.我的代码有问题吗?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.tableView.editing == YES) {
NSLog(@"now in editing mode");
}
else {
NSLog(@"now in normal mode");
}
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
// must be called first according to Apple docs
[self.tableView setEditing:editing animated:animated];
}
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return YES;
}
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellEditingStyleNone;
}
- (BOOL)tableView:(UITableView *)tableView …Run Code Online (Sandbox Code Playgroud) 我得到24小时格式的两个日期字符串如何比较?例如
当前日期:2013-06-27 13:51
服务器日期:2013-06-27 11:51
当前日期不能大于服务器日期.请帮忙
这是日期选择器
NSDateFormatter *datePickerFormat = [[NSDateFormatter alloc] init];
[datePickerFormat setDateFormat:@"yyyy-MM-dd HH:mm"];
self.myCurrentDate = [datePickerFormat stringFromDate:self.myDatePicker.date];
NSDate *myDate = [datePickerFormat dateFromString:self.myCurrentDate];
Run Code Online (Sandbox Code Playgroud)
我无法将其转换为24小时格式,并且最终日期时间显示不正确.