Skip to content

Instantly share code, notes, and snippets.

@iwasrobbed
iwasrobbed / gist:5528897
Last active June 5, 2020 20:34
UICollectionView w/ NSFetchedResultsController & NSBlockOperation. Idea originated from Blake Watters (https://github.com/AshFurrow/UICollectionView-NSFetchedResultsController/issues/13)
- (void)controllerWillChangeContent:(NSFetchedResultsController *)controller
{
self.shouldReloadCollectionView = NO;
self.blockOperation = [[NSBlockOperation alloc] init];
}
- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id<NSFetchedResultsSectionInfo>)sectionInfo
atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type
{
__weak UICollectionView *collectionView = self.collectionView;
@mattyohe
mattyohe / UIView+NibLoading.h
Last active December 12, 2015 10:19
UIView Nib loading.
//
// UIView+NibLoading.h
//
// Created by Matt Yohe on 2/11/13.
//
#import <UIKit/UIKit.h>
@interface UIView (NibLoading)