Skip to content

Instantly share code, notes, and snippets.

View xxKRASHxx's full-sized avatar
🐺

Daniel Lisovoy xxKRASHxx

🐺
View GitHub Profile
@xxKRASHxx
xxKRASHxx / SortDescriptor.swift
Created February 13, 2020 12:31 — forked from calda/SortDescriptor.swift
SortDescriptor.playground
import Foundation
// MARK: SortDescriptor
/// Type-erased Sort Descriptor (can store multiple in the same array
/// regardless of the underlying KeyPath
public struct SortDescriptor<Element> {
private let comparator: (Any, Any) -> Bool
@xxKRASHxx
xxKRASHxx / CustomActivity.swift
Created July 9, 2018 15:26 — forked from shu223/CustomActivity.swift
Custom UIActivity in Swift 3
import UIKit
class CustomActivity: UIActivity {
override class var activityCategory: UIActivityCategory {
return .action
}
override var activityType: UIActivityType? {
guard let bundleId = Bundle.main.bundleIdentifier else {return nil}