Bug 4458 - Feature Request: C# style event for UIView.SetAnimationDidStopSelector()
Summary: Feature Request: C# style event for UIView.SetAnimationDidStopSelector()
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.3.x
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-16 08:48 UTC by Dermot
Modified: 2012-05-16 19:15 UTC (History)
3 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 INVALID

Description Dermot 2012-04-16 08:48:10 UTC
It would be more ideal to have a c# event (eg: AnimationComplete) instead of having to use the more long winded SetAnimationDidStopSelector() and export a selector when using UIView animations.

Thanks
Comment 1 Sebastien Pouliot 2012-04-19 15:40:58 UTC
It's definitively not C# (or .NET) friendly but I'm not sure it's worth it. From [1]:

> Use of this method is discouraged in iOS 4.0 and later. If you are using the block-based animation methods, you can include your delegate’s end code directly inside your block.

You should look at using UIView.AnimateNotify [2] which already provides delegates for the animation and at completion time.


[1] http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html


[2] http://docs.go-mono.com/index.aspx?link=M%3AMonoTouch.UIKit.UIView.AnimateNotify(System.Double%2CSystem.Double%2CMonoTouch.UIKit.UIViewAnimationOptions%2CMonoTouch.Foundation.NSAction%2CMonoTouch.UIKit.UICompletionHandler)
Comment 2 Dermot 2012-05-16 19:15:20 UTC
I was unaware of UIView.Animate(). I agree there no need for this feature. Marking as resolved.