Check Landscape/Portrait orientation in an iMessage app (extension)

前端 未结 1 1516
刺人心
刺人心 2021-01-27 10:52

Have seen a lot of solutions to check the orientation, but strangely, none works!!

Below is the code snippet,

override func viewWillTransition(to size: C         


        
1条回答
  •  逝去的感伤
    2021-01-27 11:07

    This may be because viewWillTransition executes before the view actually flips. If you do a simple print("height width \(view.frame.height) \(view.frame.width)") inside the viewWillTransition block you will see.

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