zoukankan      html  css  js  c++  java
  • 一种避免在scrollViewDidEndDragging中改变contentInset时闪动的解决方案

                [UIView animateWithDuration:0 animations:NULL completion:^(BOOL finished) {
                    [UIView animateWithDuration:0.25 animations:^{
                        scrollView.contentOffset = CGPointMake(0.0f, 0.0f);
                        scrollView.contentInset = UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f);
                    } completion:NULL];
                }];

    关键在于:套两层animation!

    keyword: UIScrollView contentInset contentOffset

  • 相关阅读:
    作业练习
    作业练习
    作业
    作业
    作业
    作业
    作业
    作业
    作业
    作业
  • 原文地址:https://www.cnblogs.com/ashamp/p/4700295.html
Copyright © 2011-2022 走看看