How i call NSObject method in UIViewController class method?

Posted by Rajendra Bhole on Stack Overflow See other posts from Stack Overflow or by Rajendra Bhole
Published on 2010-03-12T10:45:38Z Indexed on 2010/03/12 10:47 UTC
Read the original article Hit count: 216

Filed under:

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?

© Stack Overflow or respective owner

Related posts about iphone