On Oct 18, 2014, at 2:22 PM, Mazzaroth M. <taomaili...@gmail.com> wrote:
> 
> Hi, I have a parent view controller that has two UICollectionViewController
> subclasses as children in its view controller hierarchy. I'd like to set
> the parentViewController as the Subclass1CollectionViewController and
> Subclass2CollectionViewControllers' .colllectionView UIScrollView delegate.
> However when I set the delegate, the compiler assumes I'm trying to assign
> it as the UICollectionViewDelegate. UICollectionView is a subclass of
> UIScrollView.. how do refer to its scrollview delegate pointer?

There is only one delegate property. UICollectionView redeclares the property 
it inherits from UIScrollView and retypes it as UICollectionViewDelegate, which 
extends UIScrollViewDelegate. Any object you assign as the collection view’s 
delegate *must* conform to UICollectionViewDelegate.

The good news is that every member of UICollectionViewDelegate is optional, so 
this is a trivial change.

--Kyle Sluder

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to