Skip to content

Instantly share code, notes, and snippets.

import Dispatch
final class Debouncer {
private var currentWorkItem = DispatchWorkItem(block: {})
private let interval: TimeInterval
private let queue: DispatchQueue
init(interval: TimeInterval, queue: DispatchQueue = .main) {
self.interval = interval
self.queue = queue
@calt
calt / Tabbar.Swift
Last active January 9, 2024 05:58
UITabBar with custom height in Swift, does not work for iOS 14 or later.
// Does not work on iOS 14.0 or later, keeping the gist just for reference.
extension UITabBar {
override open func sizeThatFits(size: CGSize) -> CGSize {
super.sizeThatFits(size)
var sizeThatFits = super.sizeThatFits(size)
sizeThatFits.height = 71
return sizeThatFits
}
}