3D Door Open Animation between two UIViewControllers

前端 未结 1 1452
孤城傲影
孤城傲影 2020-12-29 16:30

This has been asked before, but there is no sample code to be found on stackoverflow and no proper solutions as far as I\'m aware. I have a solution, but it looks crap. I\'d

相关标签:
1条回答
  • 2020-12-29 17:18

    You have to apply a little trick to get 3D to work:

    CATransform3D _3Dt = CATransform3DIdentity;
    _3Dt.m34 = 1.0 / -1000;
    

    This creates perspective transform. 1000 represents the distance from the viewer to the objects (you can experiment with this value to get a smooth look).

    0 讨论(0)
提交回复
热议问题