Skip to content

Instantly share code, notes, and snippets.

View manjuhere's full-sized avatar

Manjunath manjuhere

  • OlaCabs
  • Bangalore, India
View GitHub Profile
@manjuhere
manjuhere / UIView+Border.swift
Last active October 23, 2019 06:08
Add & Remove borders on a UIView for various positions.
//
// UIView+Border.swift
//
// Created by Manjunath Chandrashekar on 03/11/18.
// Copyright © 2018 Manjunath Chandrashekar. All rights reserved.
//
import Foundation
extension UIView {
@nor0x
nor0x / UICollectionView + NSFetchedResultsController.swift
Last active March 21, 2021 12:52 — forked from nazywamsiepawel/UICollectionView + NSFetchedResultsController.swift
UICollectionView + NSFetchedResultsController Swift 3 / iOS 10
var _fetchedResultsController: NSFetchedResultsController<Entity>? = nil
var blockOperations: [BlockOperation] = []
var fetchedResultController: NSFetchedResultsController<Entity> {
if _fetchedResultsController != nil {
return _fetchedResultsController!
}
let fetchRequest: NSFetchRequest<Entity> = Entity.fetchRequest()
let managedObjectContext = (UIApplication.shared.delegate as! AppDelegate).managedObjectContext!