Hi,I am the beginner in iphone development. I develop an application in which i calling some GPS related information(method name is getGPSInformation{}) in clsGPS{} is an pure NSObject class.The code is as follows,
#import "clsGPS.h"
-(void)getGPSInformation
{
locationManager = [[CLLocationManager alloc ] init];
locationManager.delegate = self;
locationManager.distanceFilter = 5.0f;
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters;
[locationManager startUpdatingLocation];
}
I want the above method calling in UIViewController class. How i call this method in UIViewController class from that i automatically call this method at application launching time? should i calling that method in viewDidLoad event or viewWillAppear method?