Bug 21316 - Make method protected virtual void RegisterClassForSupplementaryView (IntPtr viewClass, MonoTouch.Foundation.NSString kind, MonoTouch.Foundation.NSString reuseIdentifier) public instead of protected.
Summary: Make method protected virtual void RegisterClassForSupplementaryView (IntPtr ...
Status: RESOLVED DUPLICATE of bug 18269
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.2.5
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-14 14:50 UTC by Jon Goldberger [MSFT]
Modified: 2014-07-25 08:07 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 DUPLICATE of bug 18269

Comment 1 Jon Goldberger [MSFT] 2014-07-14 14:57:09 UTC
Make method:

protected virtual void RegisterClassForSupplementaryView (IntPtr viewClass, MonoTouch.Foundation.NSString kind, MonoTouch.Foundation.NSString reuseIdentifier)

public instead of protected. 

From desk case:

"I'm also a little confused as to why this method 

>http://iosapi.xamarin.com/?link=M%3aMonoTouch.UIKit.UICollectionView.RegisterClassForSupplementaryView(System.IntPtr%2cMonoTouch.Foundation.NSString%2cMonoTouch.Foundation.NSString)

is bound to be protected? There are numerous objective-c examples (eg. http://jaanus.com/blog/2014/04/12/how-to-add-a-custom-separator-supplementary-view-to-uicollectionview/) of people using this method not within a class which inherits UICollectionView. Shouldn't the first argument also be a Type, not IntPtr?"

-------------------------------------------------
After pointing out that there is a public version of this method:
> public void RegisterClassForSupplementaryView(Type cellType, UICollectionElementKindSection section, NSString reuseIdentifier);

"There’s definitely a need for the protected version to be public.

The public version takes an enum, transforms it into a string and calls the protected method. There are scenarios (such as the one I have encountered) where the UICollectionViewLayout has more than just a header and footer – in my case, I am using this to build a calendar week view. This requires calling the protected method to give a kind other than header or footer."
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-07-15 13:15:28 UTC

*** This bug has been marked as a duplicate of bug 18269 ***
Comment 3 Nick 2014-07-25 08:07:02 UTC
Original bug should be reopened