First commit

This commit is contained in:
Norbert Schmidt
2017-09-04 11:40:05 +02:00
commit 025e53504d
113 changed files with 20931 additions and 0 deletions

66
Classes/MyCLController.m Executable file
View File

@@ -0,0 +1,66 @@
//
// MyCLController.m
// IDSC
//
// Created by Norbert Schmidt on 21-01-11.
// Copyright 2011 DDQ. All rights reserved.
//
#import "MyCLController.h"
@implementation MyCLController
@synthesize locationManager;
@synthesize delegate;
- (id) init {
self = [super init];
if (self != nil) {
self.locationManager = [[CLLocationManager alloc] init] ;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
self.locationManager.delegate = self; // send loc updates to myself
}
return self;
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
[self.delegate locationUpdate:newLocation];
}
- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading
{
[self.delegate headingUpdate:newHeading];
}
- (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager {
if (self.delegate && [self.delegate respondsToSelector:@selector(locationManagerShouldDisplayHeadingCalibration:)]) {
return [self.delegate locationManagerShouldDisplayHeadingCalibration:manager];
}
return YES;
}
- (void)locationManager:(CLLocationManager *)manager
didFailWithError:(NSError *)error
{
[self.delegate locationError:error];
}
@end