Bug 14861 - bad C# API for UIViewController custom transition
Summary: bad C# API for UIViewController custom transition
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.0.x
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2013-09-19 12:43 UTC by Vincent Bellet
Modified: 2014-11-04 05:56 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Vincent Bellet 2013-09-19 12:43:20 UTC
iOS 7 introduced new API for managing custom transition between UIViewController.

While it work well, the APi choice is badly thought for the UIViewControllerTransitioningDelegate delegate :

public override IUIViewControllerAnimatedTransitioning PresentingController (UIViewController presented, UIViewController presenting, UIViewController source)
			{

			}

			public override IUIViewControllerAnimatedTransitioning GetAnimationControllerForDismissedController (UIViewController dismissed)
			{

			}


there is no CONSISTENCY between the two! (one have get and the other doesn't)

Proposal :

Make it balance and consistent so you either go for two gets or none!

On a general note and I know that I will go outside the code of bug report but changing cocoa API is bad, cause all objc resources like tutorial and tips are harder to translate when API is not the same.
Comment 1 Vincent Bellet 2013-09-19 12:47:25 UTC
to be more clear here the proposal API change :

either :

public virtual IUIViewControllerAnimatedTransitioning GetAnimationControllerForPresentingController (UIViewController presented, UIViewController presenting, UIViewController source)

OR 

public virtual IUIViewControllerAnimatedTransitioning AnimationControllerForPresentingController (UIViewController presented, UIViewController presenting, UIViewController source)

(this one have my preference)
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-11-04 05:56:51 UTC
Fixed for the Unified API.

It ended up being called GetAnimationControllerForPresentedController to match the rest of the members.

monotouch/master: 19cd3ebb476c206111af012d0e3a4c8d06359f32