use portrait mode and adjust spaces between labels for umeng xcode project

This commit is contained in:
minggo 2013-04-28 16:04:41 +08:00
parent 82069860e8
commit 2cadc5784b
3 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ bool AppDelegate::applicationDidFinishLaunching()
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
// turn on display FPS
pDirector->setDisplayStats(true);
//pDirector->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don't call this
pDirector->setAnimationInterval(1.0 / 60);

View File

@ -107,7 +107,7 @@ bool HelloWorld::init()
CCLabelTTF* label = CCLabelTTF::create(s_EventMenuItem[i].id.c_str(), "Arial", 24);
CCMenuItemLabel* pMenuItem = CCMenuItemLabel::create(label, this, menu_selector(HelloWorld::eventMenuCallback));
pMenu->addChild(pMenuItem, 0, s_EventMenuItem[i].tag);
yPos = size.height - 50*i - 100;
yPos = size.height - 35*i - 100;
pMenuItem->setPosition( ccp(size.width / 2, yPos));
}
@ -115,8 +115,8 @@ bool HelloWorld::init()
std::string strVer = g_pAnalytics->getPluginVersion();
char ret[256] = { 0 };
sprintf(ret, "Plugin : %s, Ver : %s", strName.c_str(), strVer.c_str());
CCLabelTTF* pLabel = CCLabelTTF::create(ret, "Arial", 24, CCSizeMake(size.width, 0), kCCTextAlignmentCenter);
pLabel->setPosition(ccp(size.width / 2, yPos - 100));
CCLabelTTF* pLabel = CCLabelTTF::create(ret, "Arial", 18, CCSizeMake(size.width, 0), kCCTextAlignmentCenter);
pLabel->setPosition(ccp(size.width / 2, yPos - 80));
addChild(pLabel);
CCLabelTTF* label = CCLabelTTF::create("reload all plugins", "Arial", 24);

View File

@ -54,7 +54,7 @@
// Override to allow orientations other than the default portrait orientation.
// This method is deprecated on ios6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return UIInterfaceOrientationIsLandscape( interfaceOrientation );
return UIInterfaceOrientationIsPortrait( interfaceOrientation );
}
// For ios6.0 and higher, use supportedInterfaceOrientations & shouldAutorotate instead