Slow performance for presentViewController - depends on complexity of presentING controller?

前端 未结 5 1591
有刺的猬
有刺的猬 2021-02-04 02:30

I am presenting a view controller:

SCAAboutController2 *controller = [[SCAAboutController2 alloc] initWithNibName:nil bundle:nil];
UINavigationController *navCon         


        
5条回答
  •  星月不相逢
    2021-02-04 02:37

    I know I posting the answer year late. But if it is helpful for anybody else.

    Try putting (swift code)

    self.view.layer.shouldRasterize = true;
    self.view.layer.rasterizationScale = UIScreen.mainScreen().scale;
    

    for the view controller that being presented (and if it doesn't work there try putting it on the parent as well. I have put it on the both, it just helps smoothen all the other animations as well)

    Hope this helps.

提交回复
热议问题