From 2a7cdcc81fb66500ce3cd9c3650db28997fa6da5 Mon Sep 17 00:00:00 2001 From: Ash Furrow Date: Fri, 18 Oct 2013 07:05:40 -0400 Subject: [PATCH] Cast self to id for assignment to remove compiler warning and re-assigned self as UICV delegate. --- FRP/FRPGalleryViewController.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FRP/FRPGalleryViewController.m b/FRP/FRPGalleryViewController.m index f1ddadf..85391c2 100644 --- a/FRP/FRPGalleryViewController.m +++ b/FRP/FRPGalleryViewController.m @@ -20,10 +20,9 @@ static NSString *CellIdentifier = @"Cell"; -@interface FRPGalleryViewController () +@interface FRPGalleryViewController () @property (nonatomic, strong) NSArray *photosArray; -@property (nonatomic, strong) id collectionViewDelegate; @end @@ -71,9 +70,12 @@ static NSString *CellIdentifier = @"Cell"; [[self rac_signalForSelector:@selector(collectionView:didSelectItemAtIndexPath:) fromProtocol:@protocol(UICollectionViewDelegate)] subscribeNext:^(RACTuple *arguments) { @strongify(self); FRPFullSizePhotoViewController *viewController = [[FRPFullSizePhotoViewController alloc] initWithPhotoModels:self.photosArray currentPhotoIndex:[(NSIndexPath *)arguments.second item]]; - viewController.delegate = self; + viewController.delegate = (id)self; [self.navigationController pushViewController:viewController animated:YES]; }]; + + // Need to "reset" the cached values of respondsToSelector: of UIKit + self.collectionView.delegate = self; } #pragma mark - UICollectionViewDataSource Methods