• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: viewWillDisappear not being called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: viewWillDisappear not being called


  • Subject: Re: viewWillDisappear not being called
  • From: Heath Borders <email@hidden>
  • Date: Tue, 26 Apr 2011 00:29:32 -0500

> It sure would have been helpful if viewWillDisappear was sent as
> documented. When the home button is pressed, and the home screen is
> presented, the view has clearly disappeared (no offense Alex).

I was seeing this when switching tabs, not when the home button was pressed.

-Heath Borders
email@hidden
Twitter: heathborders
http://heath-tech.blogspot.com



On Tue, Apr 26, 2011 at 12:19 AM, Jeffrey Walton <email@hidden> wrote:
> On Mon, Apr 25, 2011 at 11:04 PM, Heath Borders <email@hidden> wrote:
>> I've seen this behavior also, specifically on iOS 3.1 while using a
>> UIViewController inside a UINavigationController inside a
>> UITabBarController.
> YES - that is nearly my setup (iOS 4.3.2). I don't have the
> intermediate UINavigationController, but the view has an
> UINavigationBar.
>
> Any ideas on how to locate an arbitrary view controller? The following
> only locates the 5 associated with the Tab Bar, and not the top most
> PasswordPromptController (which was presented modally).
>
> It sure would have been helpful if viewWillDisappear was sent as
> documented. When the home button is pressed, and the home screen is
> presented, the view has clearly disappeared (no offense Alex).
>
> Jeff
>
> - (void)applicationWillResignActive:(UIApplication *)application
> {
>  if(tabBarController.viewControllers != nil)
>    [self clearPasswords:tabBarController.viewControllers];
> }
>
> - (void)clearPasswords:(NSArray *)viewsControllers
> {
>  Class passwordPromptClass = [PasswordPromptController class];
>
>  for (UIViewController * viewController in viewsControllers)
>  {
>    if ([viewController isKindOfClass:passwordPromptClass])
>      [(PasswordPromptController *)viewController clearPassworAndPin];
>  }
> }
>
>>
>> On Mon, Apr 25, 2011 at 9:59 PM, Jeffrey Walton <email@hidden> wrote:
>>> Hi All,
>>>
>>> According to the documentation in the headers:
>>>
>>>    // UIViewController.h
>>>    // Called when the view is dismissed, covered or otherwise hidden.
>>>    - (void)viewWillDisappear:(BOOL)animated;
>>>
>>> And Apple's documentation [1]:
>>>
>>>    Notifies the view controller that its view is about to be dismissed,
>>>    covered, or otherwise hidden from view.
>>>
>>> I'm not sure if I should be surprised or not, but viewWillDisappear
>>> does not appear to be called despite what the documentation claims.
>>>
>>> The view is part of a custom view controller (built with IB - nothing
>>> fancy) and presented modally. To duplicate, show a view modally and
>>> press the home button.
>>>
>>> Thanks in advance,
>>> Jeff
>>>
>>> [1] http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
>>> [SNIP]
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >viewWillDisappear not being called (From: Jeffrey Walton <email@hidden>)
 >Re: viewWillDisappear not being called (From: Heath Borders <email@hidden>)
 >Re: viewWillDisappear not being called (From: Jeffrey Walton <email@hidden>)

  • Prev by Date: Re: viewWillDisappear not being called
  • Next by Date: Re: viewWillDisappear not being called
  • Previous by thread: Re: viewWillDisappear not being called
  • Next by thread: Re: viewWillDisappear not being called
  • Index(es):
    • Date
    • Thread