Bug 7784 - UICollectionViewDelegate subclasses the wrong class
Summary: UICollectionViewDelegate subclasses the wrong class
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-10-10 19:01 UTC by Pierce Boggan [MSFT]
Modified: 2012-10-11 16: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 FIXED

Description Pierce Boggan [MSFT] 2012-10-10 19:01:25 UTC
It should be a subclass of UIScrollViewDelegate.

Apple's Reference: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UICollectionViewDelegate_protocol/Reference/Reference.html
Our Reference: http://docs.go-mono.com/?link=T%3aMonoTouch.UIKit.UICollectionViewDelegate

Will be providing more detailed info later; may be creating issue with scroll events not firing when a UICollectionViewDelegate is wired up to a UICollectionView.
Comment 2 Sebastien Pouliot 2012-10-11 16:00:51 UTC
we can't use [baseType] but we can inherit and bring UIScrollViewDelegate members

 	public virtual void DecelerationEnded (UIScrollView scrollView);
 	public virtual void DecelerationStarted (UIScrollView scrollView);
 	public virtual void DidZoom (UIScrollView scrollView);
 	public virtual void DraggingEnded (UIScrollView scrollView, bool willDecelerate);
 	public virtual void DraggingStarted (UIScrollView scrollView);
 	public virtual void ScrollAnimationEnded (UIScrollView scrollView);
 	public virtual void Scrolled (UIScrollView scrollView);
 	public virtual void ScrolledToTop (UIScrollView scrollView);
 	public virtual bool ShouldScrollToTop (UIScrollView scrollView);
 	public virtual UIView ViewForZoomingInScrollView (UIScrollView scrollView);
 	public virtual void WillEndDragging (UIScrollView scrollView, System.Drawing.PointF velocity, ref System.Drawing.PointF targetContentOffset);
 	public virtual void ZoomingEnded (UIScrollView scrollView, UIView withView, float atScale);
 	public virtual void ZoomingStarted (UIScrollView scrollView, UIView view);
 
to

 	* MonoTouch.UIKit.UICollectionViewController
 	* MonoTouch.UIKit.UICollectionViewDelegate
 	* MonoTouch.UIKit.UICollectionViewSource


diff --git a/src/uikit.cs b/src/uikit.cs
index fac2994..f35fcc8 100644
--- a/src/uikit.cs
+++ b/src/uikit.cs
@@ -1257,7 +1257,7 @@ namespace MonoTouch.UIKit {
        [Since (6,0)]
        [BaseType (typeof (NSObject))]
        [Model]
-       interface UICollectionViewDelegate {
+       interface UICollectionViewDelegate : UIScrollViewDelegate {
                [Export ("collectionView:shouldHighlightItemAtIndexPath:")]
                bool ShouldHighlightItem (UICollectionView collectionView, NSIndexPath indexPath);
Comment 3 Sebastien Pouliot 2012-10-11 16:15:30 UTC
Fixed in
ios6: 19f717ce7235cebd99b50ec38dc0599729b2c9a0
master: bbb28dff82a113c429b2b08ff8ead6a5f2e7ee25