The Wayback Machine - http://web.archive.org/web/20200905081612/https://github.com/CoderMJLee/MJRefresh/issues/862
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

关闭初始刷新动画-viewDidLoad里面执行beginRefreshing #862

Open
youngsoft opened this issue Feb 27, 2017 · 0 comments
Open

关闭初始刷新动画-viewDidLoad里面执行beginRefreshing #862

youngsoft opened this issue Feb 27, 2017 · 0 comments
Labels

Comments

@youngsoft
Copy link

@youngsoft youngsoft commented Feb 27, 2017

在一个很常见的场景中是我们在viewDidLoad里面执行beginRefreshing,这样系统的导航条push动画和下拉动画就会同时执行,给人的感觉就是在进入页面时会斜着进来的动画效果。这样严重影响体验。因此建议在MJRefreshComponent里面的drawRect进行状态更新时,不要产生动画,而是改为如下:

  • (void)drawRect:(CGRect)rect
    {
    [super drawRect:rect];

    if (self.state == MJRefreshStateWillRefresh) {
    // 预防view还没显示出来就调用了beginRefreshing
    [UIView performWithoutAnimation:^{
    self.state = MJRefreshStateRefreshing;
    }];
    }
    }

@wolfcon wolfcon added the enhancement label Jun 27, 2019
@wolfcon wolfcon changed the title 建议在MJRefreshComponent中进行如下修改 关闭初始刷新动画-viewDidLoad里面执行beginRefreshing Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.