Breaking News

Recent Posts

Coco2d 2x upgrade error – Cannot find protocol declaration

Issue On upgrading to cocos2d 2.x for 1.x, the project fails to compile and the following two errors are displayed: 1) Cannot find protocol declaration for CCTargetTouchDelegate 2) Cannot find protocol declaration for CCStandardTouchDelegate Solution In cocos2d 2.x the delegates class names have been renamed as follows: CCTargetedTouchDelegate -> CCTouchOneByOneDelegate …

Read More »

How do you set a background image in UINavigationBar in iOS?

In order to set a background image for the navigation controller use the following code: // get handle to nav bar UINavigationBar *navBar = self.navigationController.navigationBar; // get imageUIImage *image = [UIImage imageNamed:@”backgroundImageToSet.png”]; // set the bg image[navBar setBackgroundImage:image]; in the viewWillAppear method. – (void)viewWillAppear:(BOOL)animated [pb_builder]

Read More »

How to keep screen from dimming or sleeping in Android?

In order for your application screen  need s to keep the screen from dimming or the processor from sleeping,  you must request this permission. <uses-permission android:name=”android.permission.WAKE_LOCK” /> Specifically if you have a scenario where in Audio is being played using the MediaPlayer and you are invoking the MediaPlayer.setScreenOnWhilePlaying() or MediaPlayer.setWakeMode() …

Read More »
Advertisment ad adsense adlogger