iphone - Retrieving Latitude & Longitude CoOrdinates, Displaying in UILabel -


i interested in grabbing users current latitude , longitude coordinates, , displaying them literally nssstring in uilabel on view.

i don't need mkmapview or show graphically, display coordinates in uilabel. possible?

could provide starting block me?

thanks

ya, possible. import #import <corelocation/corelocation.h> , declare delegate <cllocationmanagerdelegate>. can values in following delegate mathod.

- (void)locationmanager:(cllocationmanager *)manager didupdatetolocation:(cllocation *)newlocation fromlocation:(cllocation *)oldlocation{      cllocationcoordinate2d location=newlocation.coordinate;     nsstring *s = [nsstring stringwithformat:@"%f,%f",location.latitude,location.longitude]; } 

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -