Skip to content

Instantly share code, notes, and snippets.

View Rashesh-Bosamiya's full-sized avatar

Rashesh Bosamiya Rashesh-Bosamiya

View GitHub Profile
@hcn1519
hcn1519 / GradientLayer.md
Last active June 7, 2023 09:33
UITableViewCell with GradientLayer in swift

Create GradientLayer on your tableViewCell(collectionViewCell)

1. Create CAGradientLayer Instance on your tableViewCell

class MyCell: UITableViewCell {
    let gradientLayer = CAGradientLayer()
}
@ollieatkinson
ollieatkinson / AnyDiffable.swift
Last active February 12, 2023 10:14
Implementation of Paul Heckel's Diff Algorithm in Swift 3
public protocol Diffable: Hashable {
var primaryKeyValue: String { get }
}
/// A type-erased diffable value.
/// The AnyDiffable type forwards diffing, equality comparisons and hashing operations to an underlying diffing value,
/// hiding its specific underlying type.
///