Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

srinivas.be88

macrumors newbie
Original poster
Aug 10, 2010
24
0
Code:
#import <UIKit/UIKit.h>
#import "HelloEvents.h" 
 
[B]enum 
{
	kTagSprite = 1,
}[/B];

@implementation HelloEvents
 
-(id) init
{
        if( (self=[super init] )) {
               self.isTouchEnabled = YES;
                self.isAccelerometerEnabled = YES;
                 CCLabel* label = [CCLabel labelWithString:@"Hello Events"      fontName:@"Marker Felt" fontSize:64];
 
               CGSize size = [[CCDirector sharedDirector] winSize];
 
                label.position =  ccp( size.width /2 , size.height/2 );
 
              [self addChild: label];
            CCSprite *sprite = [CCSprite spriteWithFile:@"grossini.png"];
                sprite.position = ccp( 50, 50);
                [B][self addChild:sprite z:1 tag:kTagSprite];  [/B]            
        }
        return self;
}
 
- (void) dealloc
{
        [super dealloc];
}

hi to all ,
i am new to this. please explain the enum tag why we put this and the [self addChild:sprite z:1 tag:kTagSprite];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.