1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

hello events

Discussion in 'iPhone/iPad Programming' started by srinivas.be88, Aug 13, 2010.

  1. macrumors newbie

    #import <UIKit/UIKit.h>
    #import "HelloEvents.h" 
    	kTagSprite = 1,
    @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];
  2. macrumors 603

    The enum keyword means the same thing as in plain C.

    Look it up in a C reference book or online article.

Share This Page