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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 03-09-2010, 03:14 PM   #2 (permalink)
Journer
Registered Member
 
Join Date: Feb 2010
Posts: 49
Journer is on a distinguished road
Default

Quote:
Originally Posted by coconnor View Post
Hi

My iPhone app is made of of a main tabController with 4 main tabs. I have a situation where ViewController A loads ViewController B (using pushViewController). I now need to get back to ViewController A and and trigger an action on A from B.

Getting back to A is easy all I have to do is :-

self.tabBarController.selectedIndex = 0;
[self.navigationController popViewControllerAnimated:YES];

this then causes the ViewController A to be visible.

But how do I then get ViewController B to fire an action on A?

I have tried to use:-

ViewControllerA *aVC = ((ViewControllerA *)((UIViewController *)[self.tabBarC.tabBarController.viewControllers objectAtIndex:0]));
[aVC setAnnoSelected];

Only when I do that I get:-

-[UINavigationController setAnnoSelected]: unrecognized selector sent to instance 0x461d290

I have tried to use

[ViewControllerA performSelector:@selector(setAnnoSelected) withObject: nil afterDelay: 0.0];

But so far no joy.

Any ideas would be greatly appreciated.

Thanks
Cheryl

P.S. This is a great site for help - thanks to anyone who has ever answered a question as you have helped me too.
I'm trying to do the exact same thing: http://www.iphonedevsdk.com/forum/ip...d-subview.html

So far, no luck...
Journer is offline   Reply With Quote
 

» Advertisements
» Online Users: 613
16 members and 597 guests
24pfilms, AntiPi, baja_yu, BrianSlick, cgokey, ChrisYates, clarky07, G-Power, gogoman, logan, MAMN84, pipposanta, poke, QuillGames, SLIC, Speed
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,537
Threads: 94,052
Posts: 402,640
Top Poster: BrianSlick (7,979)
Welcome to our newest member, AntiPi
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:22 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.