viewWillDisappear is not getting called

885 views
Skip to first unread message

Raki iOS Dev

unread,
Mar 16, 2011, 5:29:19 AM3/16/11
to iphonesdkd...@googlegroups.com
I have a login screen on login i am creating the tabbar with 5 controllers.

In all the controllers viewWillDisappear or viewWillAppear methods are not calling.I used the NavationController also.

Any suggestions.


Regards,
Rakesh.Y,
iOSDeveloper,
Bangalore,India.
http://beginnersiosdev.blogspot.com/

rahul rathod

unread,
Mar 17, 2011, 1:09:44 AM3/17/11
to iphonesdkd...@googlegroups.com
Hey Raki..
how many navigationControllers are there?? i mean are you using different navigation controller for each different tab?? and are you doing all this in your mainview.xib??

--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To post to this group, send email to iphonesdkd...@googlegroups.com.
To unsubscribe from this group, send email to iphonesdkdevelop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonesdkdevelopment?hl=en.

Raki iOS Dev

unread,
Mar 17, 2011, 2:01:31 AM3/17/11
to iphonesdkd...@googlegroups.com
NO i am using 5 navigations controllers for five different view controllers.And i will not use IB.


Regards,
Rakesh.Y,
iOSDeveloper,
Bangalore,India.
http://beginnersiosdev.blogspot.com/


On 17 March 2011 10:39, rahul rathod <youngr...@gmail.com> wrote:
how many navigationControllers are there

sunil prajapati

unread,
Mar 18, 2011, 3:25:27 AM3/18/11
to iphonesdkd...@googlegroups.com, Raki iOS Dev
If you add view controller as a subview in the main view then viewWillAppear,ViewDidAppear etc.... will not get call for the subview controller class.


Thanks,
Sunil.




--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To post to this group, send email to iphonesdkd...@googlegroups.com.
To unsubscribe from this group, send email to iphonesdkdevelop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonesdkdevelopment?hl=en.



--
Thanks & Regards,

Sunil Prajapati
Software Developer in Macintosh/iPhone

Márcio Souza

unread,
Mar 17, 2011, 9:19:10 AM3/17/11
to iphonesdkd...@googlegroups.com
See this ...




2011/3/17 Raki iOS Dev <yadalam....@gmail.com>
--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To post to this group, send email to iphonesdkd...@googlegroups.com.
To unsubscribe from this group, send email to iphonesdkdevelop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iphonesdkdevelopment?hl=en.



--
At,

Márcio F.
Gtalk / iChat / Skype: marcioferreirass
twitter: @marciomacdev

Raki iOS Dev

unread,
Mar 18, 2011, 3:58:57 PM3/18/11
to iphonesdkd...@googlegroups.com

Hi Marcio,

Thanks for your feedback.I used that method but only viewWillAppear method only getting  called


-(void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
    NSUInteger count=[[(UINavigationController*)viewController viewControllers] count];
    [[[(UINavigationController*)viewController viewControllers] objectAtIndex:(count-1)] viewWillAppear:YES];
    [[[(UINavigationController*)viewController viewControllers] objectAtIndex:(count-1)] viewWillDisappear:YES];
}

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [viewController viewWillAppear:YES];
    [viewController viewWillDisappear:YES];
}

- (void)navigationController:(UINavigationController *)navigationController
       didShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [viewController viewDidAppear:animated];
}


Actually these methods are working fine if i use directly with out using Tabbar.My app is Tabbar based app.i am adding 5 navcontrollers to tabbar.

Afer using the above methods i am getting called viewWIllAppear , So i repeated the same code for viewWillDisapper also. BUt it is not getting called.

Please suggest, if i am doing anything wrong or if i need to do something more to achieve that viewWillDisapper method.



Regards,
Rakesh.Y,
iOSDeveloper,
Bangalore,India.
http://beginnersiosdev.blogspot.com/


2011/3/17 Márcio Souza <marciofe...@gmail.com>
Reply all
Reply to author
Forward
0 new messages