Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
LinXunFeng opened this issue Jul 17, 2021 · 1 comment · Fixed by #1536
Closed

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

LinXunFeng opened this issue Jul 17, 2021 · 1 comment · Fixed by #1536
Labels

Comments

@LinXunFeng
Copy link

描述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
@LinXunFeng LinXunFeng added the bug label Jul 17, 2021
@Kejiasir
Copy link

刚刚提交了个 Pull requests,已修复此问题。

wolfcon added a commit to wolfcon/MJRefresh that referenced this issue Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants