Return to Snippet

Revision: 59729
at September 26, 2012 23:56 by kutyadog


Initial Code
//declare the method
+(void) goGameScene:(int)lvl;   //SceneManager.h
+(void)goGameScene:(int)lvl {   //SceneManager.m

//to call the method
#import "SceneManager.h"        //in the .h of class you call it from
[SceneManager goGameScene:lvl]; //in the .m of the class you call it from

Initial URL

                                

Initial Description
I wanted to make a function / method and pass a var to it form another class.

Initial Title
xcode declare and call method with parameter

Initial Tags
function

Initial Language
Objective C