Authoranshul.jain

How to make UIView blinking (or flashing) on iphone?

H

Use this : - (void)blinkAnimation:(NSString *)animationId finished:(BOOL)finished target:(UIView *)target {     if (shouldContinueBlinking) {         [UIView beginAnimations:animationId context:target];         [UIView setAnimationDuration:0.5f];         [UIView setAnimationDelegate:self];         [UIView setAnimationDidStopSelector:@selector(blinkAnimation:finished:target:)];         if ([target...

How to get sprite animation frames using spritesheet in cocos2d

H

if you are using SpriteSheet for animation,you can extract all required frame like this…     [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"spritesheet.plist"];     CCSpriteBatchNode *spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@"spritesheet.png"];     [self addChild:spriteSheet];      NSMutableArray *frames = [[[NSMutableArray alloc]init]retain];      for(int...

How to manage application when orientation changes?

H

The problem is that when you rotate the device then (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation Method gets called but when you go to the next screen then this method does not get called. if you rotate your device again then that method gets called. So if you want to change next screen orientation as device current orientation, then check the...

Category