Snippet

BOOL locationServicesEnabled;

CLLocationManager locationManager = [CLLocationManager new];

if( [locationManager respondsToSelector:@selector(locationServicesEnabled) ] )

   locationServicesEnabled = [locationManager locationServicesEnabled];

}

else

   locationServicesEnabled = locationManager.locationServicesEnabled;

}