- Cocos2d-x by Example:Beginner's Guide(Second Edition)
- Roger Engelbert
- 77字
- 2021-07-23 20:00:27
Time for action – laying down the rules
We'll update the RootViewController.mm
file.
- Go to
RootViewController.mm
inside theios
folder and look for theshouldAutorotateToInterfaceOrientation
method. Change the line inside the method to read:return UIInterfaceOrientationIsPortrait( interfaceOrientation );
- And a few lines below in the
supportedInterfaceOrientations
method, change the line inside the conditionalto
:return UIInterfaceOrientationMaskPortrait;
What just happened?
We just told RootViewController
we want our application to play in any of the two supported portrait modes.
推薦閱讀
- Offer來了:Java面試核心知識點精講(原理篇)
- PHP+MySQL網站開發技術項目式教程(第2版)
- 編寫整潔的Python代碼(第2版)
- Python機器學習實戰
- Python機器學習編程與實戰
- OpenShift在企業中的實踐:PaaS DevOps微服務(第2版)
- Learning Apache Mahout Classification
- Keras深度學習實戰
- Visual Basic程序設計實驗指導(第二版)
- Learning Apache Karaf
- R用戶Python學習指南:數據科學方法
- IBM RUP參考與認證指南
- LabVIEW入門與實戰開發100例(第4版)
- 深入大型數據集:并行與分布化Python代碼
- Swift iOS Programming for Kids