码迷,mamicode.com
首页 > 移动开发 > 详细

Android和iOS中Cocos2dx的横屏竖屏设置

时间:2014-09-29 18:19:21      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:android   http   io   os   ar   strong   文件   sp   c   

一、横屏、竖屏设置

1、android

AndroidManifest.xml文件中,

screenOrientation="landscape" 为横屏,

screenOrientation="portrait"为竖屏

2、iOS

  1. - (NSUInteger) supportedInterfaceOrientations{ 
  2. #ifdef __IPHONE_6_0 
  3.     // 横屏显示 
  4.     // return UIInterfaceOrientationMaskLandscape; 
  5.     // 竖屏显示 
  6.     return UIInterfaceOrientationMaskPortrait; 
  7. #endif 

二、读写sd卡 AndroidManifest.xml文件中,先增加权限:

FILE *fp = fopen("/mnt/sdcard/xxx.xxx", "rb+");

此时就可以了,切记根目录前缀:/mnt/sdcard/ 指代sd卡的根目录

 

转自:http://mobile.51cto.com/abased-405166.htm

Android和iOS中Cocos2dx的横屏竖屏设置

标签:android   http   io   os   ar   strong   文件   sp   c   

原文地址:http://www.cnblogs.com/C-Plus-Plus/p/4000604.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!