mirror of
https://github.com/zhigang1992/FunctionalReactivePixels.git
synced 2026-06-13 09:14:42 +08:00
Cast self to id<Protocol> for assignment to remove compiler warning and re-assigned self as UICV delegate.
This commit is contained in:
@@ -20,10 +20,9 @@
|
||||
|
||||
static NSString *CellIdentifier = @"Cell";
|
||||
|
||||
@interface FRPGalleryViewController () <FRPFullSizePhotoViewControllerDelegate, UICollectionViewDelegate>
|
||||
@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<FRPFullSizePhotoViewControllerDelegate>)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
|
||||
|
||||
Reference in New Issue
Block a user