You could make a separate objective c class with class methods.
In the header file declare the method like this (let's say you want to call it
#import <UIKit/UIKit.h>
@interface pointHelper : UIViewController
+(CGPoint) randomPoint;
And then in the .m file
@implementation pointHelper
+(CGPoint) randomPoint{
//// implementation
}
When you want to evoke the method in another file.
#import "pointerHelper.h"
You will then be able to access the method like this...
CGPoint thePoint = [pointHelper randomPoint];
Or if you had an object of the class..
CGPoint thePoint = [[pointHelperObject class] randomPoint];
This is a better way of doing it, since it makes your code much clearer. [pointHelper randomPoint] tells you why you are evoking the method and what it is doing. You are using a class that has utilities for points, and you are using it to grab a random point. You don't need an object to evoke this method, because it is controlled abstractly by the class. Just be careful not to try to access properties of the class within the class method.