Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. -(void)getTimeZoneFromLatLong
  2. {
  3. CLLocation *location = [[CLLocation alloc] initWithLatitude:self.parentVC.currentCity.latitude.doubleValue longitude:self.parentVC.currentCity.longitude.doubleValue];
  4. CLGeocoder *geoCoder = [[CLGeocoder alloc]init];
  5. [geoCoder reverseGeocodeLocation: location completionHandler:^(NSArray *placemarks, NSError *error)
  6. {
  7. CLPlacemark *placemark = [placemarks objectAtIndex:0];
  8. _placemark = placemark;
  9. }];
  10. }
  11.  
  12. EDSunriseSet *eds = [EDSunriseSet sunrisesetWithTimezone:_placemark.timeZone
  13. latitude:latitude.doubleValue longitude:longitude.doubleValue];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement