thx for the response, yup, actually I tried that, but when I set up CCScreenOrientationPortrait it setup both Portrait and upside down. However, I've found the solution, however I would like to know if there is a better way to do it:
I took a dig into the CCAppDelegate.m file from cocos2d libs, and found this method:
-(NSUInteger) supportedInterfaceOrientations
{
if([_screenOrientation isEqual:CCScreenOrientationLandscape])
{
return UIInterfaceOrientationMaskLandscape;
}
else
{
return UIInterfaceOrientaionMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
}
so as you can see its taking both Portrait and upsideDown. so my solution was to remove UIInterfaceOrientationMaskPortraitUpsideDown from the or comparation to force only portait when using CCScreenOrientationPortrait.
-(NSUInteger) supportedInterfaceOrientations
{
if([_screenOrientation isEqual:CCScreenOrientationLandscape])
{
return UIInterfaceOrientationMaskLandscape;
}
else
{
return UIInterfaceOrientaionMaskPortrait;
}
}
hope this helps to someone having the same problem as I.