• 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
providesPresentationContextTransitionStyle busted?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

providesPresentationContextTransitionStyle busted?


  • Subject: providesPresentationContextTransitionStyle busted?
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 19 Dec 2011 10:39:26 -0800

According to the docs:

> @property(nonatomic, assign) BOOL providesPresentationContextTransitionStyle
> Discussion
> If the value of this property is YES and the value of the definesPresentationContext property is YES, then the modal transition style of the presenting view controller is used. Otherwise, the modal transition style of the presented view controller’s modal transition style is used.

So I tried it and it doesn't work. I simply used Xcode's built-in Utility Application template, which presents and dismisses a modal view right out of the box:

- (IBAction)showInfo:(id)sender
{
    FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideViewController" bundle:nil];
    controller.delegate = self;
    controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    // here are my additions
    self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; // *
    self.providesPresentationContextTransitionStyle = YES; // *
    self.definesPresentationContext = YES; // *
    [self presentModalViewController:controller animated:YES];
}

The three marked lines are my only change to the template. I am doing exactly what the docs say to do. But it isn't working, or rather it's working in a very lame and partial way: the transition is flip horizontal when the modal view is shown, but it is cross dissolve when the modal view is dismissed. Other combinations of the presented modal view controller's transition style and the presenting modal view controller's transition style get even weirder and can even cause the app to crash.

What most amazes me is that I can't find anyone else complaining about this online. Hence this note. Either I'm doing this totally wrong or the docs are describing it incorrectly or no one in the world has actually tried this except me! Thx - m.

--
matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


_______________________________________________

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

  • Prev by Date: Re: Handling UTIs from a Cocoa protocol
  • Next by Date: Re: Unknow CF Error
  • Previous by thread: Re: Window Identifier on Restoration
  • Next by thread: Re: providesPresentationContextTransitionStyle busted?
  • Index(es):
    • Date
    • Thread