- 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(專項(xiàng)突破版):數(shù)據(jù)結(jié)構(gòu)與算法名企面試題精講
- Arduino開發(fā)實(shí)戰(zhàn)指南:LabVIEW卷
- Learning Data Mining with Python
- PHP+MySQL網(wǎng)站開發(fā)技術(shù)項(xiàng)目式教程(第2版)
- Apache Spark 2 for Beginners
- 軟件測(cè)試項(xiàng)目實(shí)戰(zhàn)之性能測(cè)試篇
- Java Web及其框架技術(shù)
- 64位匯編語言的編程藝術(shù)
- Expert Android Programming
- Mastering Google App Engine
- Unity 3D/2D移動(dòng)開發(fā)實(shí)戰(zhàn)教程
- Serverless Web Applications with React and Firebase
- Learning Kotlin by building Android Applications
- Web前端開發(fā)最佳實(shí)踐
- Responsive Web Design with jQuery