I want to call one void function into many view controllers so how can i do it? please suggest me some idea.
A:
I think you talking about static function.you have to declare and define that function as static , then you can use that void function without initializing the class in any view contorller. And also declare that static function as public.
static function declaration is this +(void)functionName:(parametertype)parameter;
Manoj Kumar
2009-12-25 13:06:06
That's a "class method". C++ happens to use `static` to denote class fields and methods, but they're not the same thing. A "static function" would be a function declared with the "static" modifier, giving it internal linkage, which means it's only visible from within the same object file.
outis
2009-12-28 03:41:29