The docs say: > @property(nonatomic, readonly) UIViewController *presentingViewController > Discussion > The default implementation of this property walks up the view hierarchy, > starting from this view controller. The first view controller it finds that > received the presentViewController:animated:completion: method, or that has > its definesPresentationContext property set to YES is returned as the value > of the property. It keeps walking up the hierarchy until it finds a value to > return or it gets to the root view controller.
Oh, yeah? Watch this: self.definesPresentationContext = YES; self.parentViewController.definesPresentationContext = YES; NSLog(@"%i %i", self.definesPresentationContext, self.parentViewController.definesPresentationContext); // 1 1 NSLog(@"%@", self.presentingViewController); // null So both self and its parent do in fact have their definesPresentationContext property set to YES, and yet neither is being returned as the value of the property. I rest my case. Maybe the docs are talking here about some very specific situation where what's claimed is correct, but then they should say what that situation is. I've been looking for it all day and haven't found it... m. -- matt neuburg, phd = m...@tidbits.com, 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com