Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nekbeth

macrumors regular
Original poster
Feb 20, 2011
101
0
Vatican City
Hi, I'm trying to pass the result of a MKPlacemark instance to a String named "address". The placemark instance has the current location and it changes every time I press a button.

I know I have to pass it with a Format:

Code:
	NSString *someText = [NSString stringWithFormat:@"%@", address];

I'm having trouble passing the value from MKPlacemark to the address String. What I have so far is the method of reverse geocoder did finish, it gets its info from a "placemarkviewcontroller":

Code:
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
    PlacemarkViewController *placemarkViewController =
    [[PlacemarkViewController alloc] initWithNibName:@"PlacemarkViewController" bundle:nil];
    placemarkViewController.placemark = placemark;
    [self presentModalViewController:placemarkViewController animated:YES];
    
    
}

the placemark result is correct, I can even show it on a table view. I just want to make it a String. (So I can use it with ShareKit)

Thanks
 
I just did it :eek: , I only need to add this piece of code:


Code:
    x = [[NSString alloc] initWithFormat:@"%@",placemark];

Then use x variable inside the IBAction message share.


Does anyone know how to get a google link of the current address?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.