CALayer - Shadow causes a performance hit?

后端 未结 5 1931
Happy的楠姐
Happy的楠姐 2020-12-13 02:33

So I am doing some custom animations on my navigationcontroller and the way it pushes and pops the viewControllers.

Everything runs smooth. As soon as I add the foll

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 02:45

    You should expect a slowdown from adding a shadow. A shadowRadius of 20 is very high and will be especially slow.

    The other key to improve shadow rendering speed: set the shadowPath property. It can help dramatically.

提交回复
热议问题