Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

icinnamon

macrumors newbie
Original poster
Sep 7, 2007
13
0
My program works like this:
Press the start button, and it initializes CoreLocation.
Then you can select how often it updates - every meter, 10 meters, 100 meters, 1km, or as often as possible. So I have these methods:
Code:
- (IBAction)meter1 {
	[MyCLController sharedInstance].locationManager.distanceFilter = 1;
	loadingText.text = @"Updating every meter";
}
- (IBAction)meter10 {
	[MyCLController sharedInstance].locationManager.distanceFilter = 10;
	loadingText.text = @"Updating every 10 meters";
}
- (IBAction)meter100 {
	[MyCLController sharedInstance].locationManager.distanceFilter = 100;
	loadingText.text = @"Updating every 100 meters";
}
- (IBAction)meter1000 {
	[MyCLController sharedInstance].locationManager.distanceFilter = 1000;
	loadingText.text = @"Updating every kilometer";
}
- (IBAction)onPress {
	[MyCLController sharedInstance].locationManager.distanceFilter = 0;
	loadingText.text = @"Updating as often as possible";
}

But they are apparently not being called when I press the button (nothing happens).
Any advice? Thanks!

EDIT: And it works on the simulator, but not on the actual phone
Apparently, all the buttons freeze on the actual phone
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.