[iOS] iOS 7 beta & Cocos2d-X

Hi all,

I am working on Cocos2d-x for more then 1 years, just love working on it.

I have received mail from iOS people about new iOS 7 beta SDK. They have mentioned about many new features in it like Sprite Kit API for 2D games, simulate physics and particle systems.
I would like to know will cocos2d-x will get advantages of such API’s in future?

Thanks,

Paresh

BTW did anyone tested cocos2d-x on new iOS 7 beta? Does it work properly? Are there any new deprecated methods in iOS 7 that developers should be aware of?

There is status bar by default :frowning:

Kyrylo Polezhaiev wrote:

There is status bar by default :frowning:

Add following code in rootviewController
- (void)viewDidLoad
{
    [super viewDidLoad];
    if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
    {
        [self prefersStatusBarHidden];
        [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
    }
    else
    {
        // iOS 6
        [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
    }
}


// Add this Method

- (BOOL)prefersStatusBarHidden

{

 return YES;

}

I have been using ios7 for a while with a game I am writing in cocos2d-x 2.1.4 and I just upgraded to 2.1.5 and things work.

To remove the status bar you can also set a flag in info.plist versus code if you want.

FYI the new plist entry is “View controller-based status bar appearance” and set it to NO

Thanks Peter, I was going to post a pic for everyone once I got home :slight_smile:

Attached.

Yep, apart from the status bar thing it seems to me that everything else works fine in iOS 7.

Ben

Peter Tribe wrote:

FYI the new plist entry is “View controller-based status bar appearance” and set it to NO

The UI setting is “UIViewControllerBasedStatusBarAppearance”, set it to NO in your plist file.