Güncelleştirme için pusulayı kullanmak istiyorum Heading. Ama benim didUpdateHeading çağırılmadı. IOS'de daha yeniyim. Lütfen herhangi bir yardımın ortaya çıkmasına yardımcı olun.didUpdateHeading Called
@interface ViewController : UIViewController<CLLocationManagerDelegate>
@property (nonatomic, retain) CLLocationManager *locationManager;
locationManager=[[CLLocationManager alloc] init];
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.delegate=self;
//Start the compass updates.
[locationManager startUpdatingHeading];
- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading
{
NSLog(@"New magnetic heading: %f", newHeading.magneticHeading);
NSLog(@"New true heading: %f", newHeading.trueHeading);
}
kullanmak gerekir? –
Aynı problemim var. –