Skip to content

Instantly share code, notes, and snippets.

View calt's full-sized avatar
🔥

Cagdas Altinkaya calt

🔥
View GitHub Profile
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 October 10, 2024 07:06
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
}
}