Advertisement
Guest User

Untitled

a guest
May 5th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. // omitted code
  2. - (void)updateInterfaceWithLocation:(CLLocation *)lastLocation {
  3. // we update the UILabel with the longitude and latitude values
  4. self.latitude.text = [NSString stringWithFormat:@"%f",lastLocation.coordinate.latitude];
  5. self.longitude.text = [NSString stringWithFormat:@"%f",lastLocation.coordinate.longitude];
  6. }
  7.  
  8. // omitted code
  9. - (IBAction)buttonPress:(id)sender {
  10. CLLocation *lastLocation = [NFHLocationManager sharedLocationManager].lastLocation;
  11. // omitted 1 line of code - it's not important for our purposes here
  12. [self updateInterfaceWithLocation:lastLocation];
  13. }
  14.  
  15. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement