Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-08-2010, 04:00 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 18
Default work with calloutAccessoryControlTapped

Hello users,

i have implemented the following method:
Code:
- (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)annView calloutAccessoryControlTapped:(UIControl *)control {
	NSString *name = annView.annotation.title;
	NSLog(name, [annView description]);
}
this is in my mapView class, and my second class is an listView, now my question, how can i use the String name in the other class in the
- (void)viewDidLoad method?

sorry about my bad english, i hope you can help me please?
marco_mn is offline   Reply With Quote
Old 02-08-2010, 05:53 AM   #2 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 18
Default

can't no one help me?
marco_mn is offline   Reply With Quote
Old 02-09-2010, 02:34 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 18
Default hello?

was my question stupid?
marco_mn is offline   Reply With Quote
Old 02-09-2010, 07:20 AM   #4 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 791
Default

You must save it somewhere the other class can see. If you already have a pointer to the other class you can have a property in there that you set in the method above and the class can retrieve on its viewDidLoad method. If you create it later, you can place it globally in your App Delegate class and retrieve it from there.
nobre84 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 352
20 members and 332 guests
ADY, Dani77, Duncan C, e2applets, Grinarn, HemiMG, Herbie, JasonR, keeshux, linkmx, macquitzon216, mer10, Monstertaco, prchn4christ, Promo Dispenser, Robiwan, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,881
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, macquitzon216
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0