美文网首页
block传值

block传值

作者: 哎呦我去叫什么呢 | 来源:发表于2016-07-23 22:42 被阅读73次

    //block传值1
    typedef void(^studentAddBlock) (AlarmModel * addModel);
    //block传值2
    @property (nonatomic ,copy) studentAddBlock block;
    //block传值3
    -(void)setBlock:(studentAddBlock)block;

    studentModel * model = [[studentModel alloc] init];
    self.block(model);

    //接受传值
    timingVC.block =^(AlarmModel *addModel){

    [[arrayData firstObject] removeObjectAtIndex:path.row];
    [[arrayData firstObject] insertObject:addModel atIndex:path.row];
        
    [self.tableView reloadData];
    };
    

    相关文章

      网友评论

          本文标题:block传值

          本文链接:https://www.haomeiwen.com/subject/ompwjttx.html