Skip to content

Trailer设置MJRefreshStateIdle状态的标题不会立即生效 #1533

@LinXunFeng

Description

@LinXunFeng

描述bug

初始化 Trailer 后设置 MJRefreshStateIdle 的标题,不会立即生效!
一开始左滑出现的标题还是 滑动查看图文详情,等变成 释放查看图文详情 后再回来时,设置的标题才会生效

必现/偶发?
必现

怎么样重现这个bug

Demo MJHorizontalCollectionViewController.m 中,设置标题 MJRefreshStateIdle 状态的标题即可复现

- (void)example42 {
    __weak __typeof(self) weakSelf = self;
    
    // 左拉刷新
    MJRefreshNormalTrailer *trailer = [MJRefreshNormalTrailer trailerWithRefreshingBlock:^{
        MJTestViewController *test = [[MJTestViewController alloc] init];
        [weakSelf.navigationController pushViewController:test animated:YES];
        [weakSelf.collectionView.mj_trailer endRefreshing];
    }];

    [trailer setTitle:@"aaa" forState:MJRefreshStateIdle]; // 这一行

    self.collectionView.mj_trailer = trailer;
}

你期望的结果是什么?
设置的标题能正常生效

运行环境

  • iPhone7
  • iOS14.4
  • Xcode12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions