Skip to content

Instantly share code, notes, and snippets.


Louis Encontre AppsTitude

View GitHub Profile
View RxViewModel.swift
protocol ViewModelInputs {
var buttonTapped: AnyObserver<Void> { get }
protocol ViewModelOutputs {
var showLoginErrorMessage: Driver<String> { get }
protocol ViewModelIO {
var inputs: ViewModelInputs { get }
AppsTitude / UICollection and NSFetchedResultsControllerDelegate integration.swift
Last active Mar 26, 2021
UICollectionView and NSFetchedResultsControllerDelegate integration in Swift
View UICollection and NSFetchedResultsControllerDelegate integration.swift
// I just implemented that with Swift. So I would like to share my implementation.
// First initialise an array of NSBlockOperations:
var blockOperations: [NSBlockOperation] = []
// In the did change object method:
func controller(controller: NSFetchedResultsController, didChangeObject anObject: AnyObject, atIndexPath indexPath: NSIndexPath?, forChangeType type: NSFetchedResultsChangeType, newIndexPath: NSIndexPath?) {
if type == NSFetchedResultsChangeType.Insert {
println("Insert Object: \(newIndexPath)")