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:
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
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