• 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
iOS popovers - View lifecycle.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iOS popovers - View lifecycle.


  • Subject: iOS popovers - View lifecycle.
  • From: Alex Zavatone <email@hidden>
  • Date: Fri, 07 Sep 2012 10:39:13 -0400

iOS 5.0.1

I just noticed that when we open a popover ala a segue, that after it is dismissed, when it is opened again, none of the view lifecycle methods are called.

viewWillAppear, viewDidAppear both don't get called, but it appears just fine.

Is this expected behaviour?

Does presentPopoverFromBarButtonItem need to be trapped to get the methods that I expected to be called get called?

What we're using to handle popover display from a barButtonItem is this:

- (IBAction)popoverButtonWasClicked:(id)sender {
    if(popoverViewController){
        if([self.popoverViewController isPopoverVisible]){
            // dismiss popover and do search
            [popoverViewController dismissPopoverAnimated:YES];
            // do search
            [self performQuery];
            self.filtersPopoverButton.title = @"Filters Menu";
        }
        else{
            [popoverViewController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
            self.filtersPopoverButton.title = @"Perform Search";
        }
    }
    else
    {
        [self performSegueWithIdentifier:@"Filters Popover" sender:sender];
        self.filtersPopoverButton.title = @"Perform Search";
    }
}

Sure, I can explicitly call [popoverViewController viewWillAppear] from the above method, but it seems really strange that the methods don't get called the second time the popover is displayed.


_______________________________________________

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

  • Follow-Ups:
    • Re: iOS popovers - View lifecycle.
      • From: Mikkel Islay <email@hidden>
  • Prev by Date: Re: Collision between Cocoa classes for AU and VST plugins
  • Next by Date: Re: autosavesInPlace and sandbox
  • Previous by thread: Re: Is QuickLook implemented upon CGImage or CGImageSource under the hood?
  • Next by thread: Re: iOS popovers - View lifecycle.
  • Index(es):
    • Date
    • Thread