I have requirement like on my current location one view will display. It will rotate if device was rotate or location will be change.I research lot but got all the code whic
you can do something like -
-(void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading {
CLLocationDirection direction = newHeading.trueHeading;
lastDriverAngleFromNorth = direction;
self.driverMarker.rotation = lastDriverAngleFromNorth - mapBearing;
}
#pragma mark - GMSMapViewDelegate
- (void)mapView:(GMSMapView *)mapView didChangeCameraPosition:(GMSCameraPosition *)position {
mapBearing = position.bearing;
self.driverMarker.rotation = lastDriverAngleFromNorth - mapBearing;
}