- 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.
推薦閱讀
- DevOps for Networking
- 前端跨界開發(fā)指南:JavaScript工具庫原理解析與實戰(zhàn)
- 樂學Web編程:網(wǎng)站制作不神秘
- JavaScript Unlocked
- INSTANT MinGW Starter
- Podman實戰(zhàn)
- GeoServer Beginner's Guide(Second Edition)
- PHP+MySQL網(wǎng)站開發(fā)項目式教程
- 碼上行動:用ChatGPT學會Python編程
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- 開源項目成功之道
- Java程序設(shè)計與項目案例教程
- Mastering JavaScript Promises
- JavaScript程序設(shè)計基礎(chǔ)教程(慕課版)
- Flutter for Beginners