3.20 内存及效率的一些总结
3.21 设置竖屏
1、android
AndroidManifest.xml文件中,
screenOrientation="landscape" 为横屏,
screenOrientation="portrait"为竖屏
2、IOS
- (NSUInteger) supportedInterfaceOrientations
{
#ifdef __IPHONE_6_0
// 横屏显示
// return UIInterfaceOrientationMaskLandscape;
// 竖屏显示
return UIInterfaceOrientationMaskPortrait;
#endif
}
RootViewController.cpp 文件中 如下代码 设置竖屏
// Override to allow orientations other than the default portrait orientation.
// This method is deprecated on ios6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return UIInterfaceOrientationIsLandscape( interfaceOrientation );
}
3.22 CCLOG与CCLog区别
CCLOG:在编译代码是不参与编译
CCLog:需要通过打印语句调试编译代码时使用