0621

////这个也有用

//- (nullable NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{

//    UITableViewRowAction *firstAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"你猜" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {

//        /** 1. 更新数据源:向数组中添加数据. */

//        [_autoMarry insertObject:@"abcd" atIndex:indexPath.row];

//        

//        /** 2. TableView中插入一个cell. */

//        [tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];

//        

//        NSLog(@"22");

//        

//    }];

//    UITableViewRowAction *secondAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"我不猜" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {

//        

//        

//    }];

//    firstAction.backgroundColor = [UIColor purpleColor];

//    secondAction.backgroundColor = [UIColor blueColor];

//    return @[firstAction,secondAction];

//}

 

 

 

 

 

 

/*

 //     点击 + 图标的操作.

//    if (editingStyle == UITableViewCellEditingStyleInsert) { *< 判断编辑状态是插入时.

//        * 1. 更新数据源:向数组中添加数据. */

//        [_autoMarry insertObject:@"abcd" atIndex:indexPath.row];

//

//        * 2. TableView中插入一个cell. */

//        [tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];

//        editIndex = indexPath;

//

//    }

// */?

 

 

 

 

/*另外一个控制器

 

 @property(nonatomic,strong)nameViewController *nameController;

 

 self.nameController=[[nameViewController alloc]init];

 

 

 

 did方法中

 self.nameController.delegate=self;

 [self.navigationController pushViewController:self.nameController animated:YES];

 

 

 .m

 

 

 self.name=self.nameField.text;

 

 if ([self.delegate respondsToSelector:@selector(save:)]) {

 [self.delegate save:self.name];

 }

 

 [self.navigationController popViewControllerAnimated:YES];

 

 

 -(void)save:(NSString *)name{

 

 _realNamepff=name;

 刷新值

 

 [_contentMarr  replaceObjectAtIndex:0 withObject:name];

 //      用来刷新指定的行

 [_tbView reloadRowsAtIndexPaths:@[_nameIndexpath] withRowAnimation:UITableViewRowAnimationNone];

 

 

 }

 */

posted @ 2016-06-21 15:54  zhen_zhen  阅读(114)  评论(0编辑  收藏  举报