Just use the standard C syntax; remember, Objective-C is a strict superset of C.
In a .h
file, write the declaration
extern return_type function_name(argument_type1 argument_name1,argument_type2 argument_name 2);
and in a .m
file (or .c
file or whatever), write the implementation
return_type function_name(argument_type1 argument_name1,argument_type2 argument_name 2){
....
}
If it's in a .m
file, it should be put outside of @implementation ... @end
block. (Well, you can put your function within it, but I find it confusing.) That's it!