Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 13, 2010, 07:39 AM   #1
srinivas.be88
macrumors newbie
 
Join Date: Aug 2010
hello events

Code:
#import <UIKit/UIKit.h>
#import "HelloEvents.h" 
 
enum 
{
	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);
                [self addChild:sprite z:1 tag:kTagSprite];              
        }
        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];

Last edited by SilentPanda; Aug 13, 2010 at 07:43 AM. Reason: code tags
srinivas.be88 is offline   0 Reply With Quote
Old Aug 13, 2010, 11:59 AM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
The enum keyword means the same thing as in plain C.

Look it up in a C reference book or online article.
chown33 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhoto events not adding? But shows under Photos... benguild Mac Applications and Mac App Store 3 Sep 27, 2013 07:03 PM
delete one recurring ical event with automator sammy.d Mac Applications and Mac App Store 0 Jun 8, 2011 02:01 AM
Apple schedules secret retail employee meeting ahead of possible media event Cully411 MacBook Pro 36 Feb 22, 2011 06:35 PM
Gem I found on a Chinese forum, regarding new MBP, ipad 2, possible event on 3/1? CrystalPepsi MacBook Pro 8 Feb 21, 2011 03:44 PM
Help me! Help me recover my iPhoto Events MacFabulous Mac Applications and Mac App Store 2 Nov 19, 2010 01:22 PM


All times are GMT -5. The time now is 10:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC