zoukankan      html  css  js  c++  java
  • No view controller managing visible view

    UIPageViewController

     

    // Set visible view controllers, optionally with animation. Array should only include view controllers that will be visible after the animation has completed.

    // For transition style 'UIPageViewControllerTransitionStylePageCurl', if 'doubleSided' is 'YES' and the spine location is not 'UIPageViewControllerSpineLocationMid', two view controllers must be included, as the latter view controller is used as the back.

    - (void)setViewControllers:(nullable NSArray<UIViewController *> *)viewControllers direction:(UIPageViewControllerNavigationDirection)direction animated:(BOOL)animated completion:(void (^ __nullable)(BOOL finished))completion;

    https://forums.developer.apple.com/thread/6554

    First of all, setViewControllers:direction:animated:completion: is for you to set all the view controllers that will be visible after the animation has finished: sending that an array that consists solely of a freshly allocated UIPageViewController means that the original pageViewController object will just be showing a brand new UIPageViewController and no content view controllers, which I'm pretty sure is very bad and really not what you intended.

    The array should consist of whichever view controllers you want to be showing next.

    Secondly, is your UIPageViewController set with a page transition style of UIPageViewControllerTransitionStyleScroll?

    If so, there is indeed a bug in UIKit that sometimes causes this exception; I *think* it can be prevented by making sure you don't initiate a second call to setViewControllers:direction:animated:completion: until the first has completed, but I've yet to test the theory.

  • 相关阅读:
    laravel在控制器中动态创建数据表
    laravel模型关联:
    laravel的firstOrCreate的作用:先查找表,如果有就输出数据,如果没有就插入数据
    创建一个自定义颜色IRgbColor
    tnt_esri.dat Arcgis8.1安装license
    arcgis desktop 10.1 license manager无法启动问题解决
    解决ArcGIS安装之后出现的Windows installer configures问题
    Arcgis 10.1安装
    Arcgis10安装说明
    ARCGIS9.3安装说明
  • 原文地址:https://www.cnblogs.com/dengchaojie/p/8342269.html
Copyright © 2011-2022 走看看