Skip to content

Instantly share code, notes, and snippets.

//
// ViewController.swift
// Havaii
//
// Created by Kirill Danilov on 15.09.2023.
//
import UIKit
import HdWalletKit
import BitcoinKit
@Styrmist
Styrmist / RunOnce.swift
Created February 16, 2020 12:29
run something only once
import Foundation
public class Once {
var already: Bool = false
public init() { }
public func run(_ block: () -> Void) {
guard !already else {
@Styrmist
Styrmist / CustomIntensityVisualEffectView.swift
Created December 12, 2019 09:54 — forked from darrarski/CustomIntensityVisualEffectView.swift
UIVisualEffectView subclass that allows to customise effect intensity
import UIKit
class CustomIntensityVisualEffectView: UIVisualEffectView {
/// Create visual effect view with given effect and its intensity
///
/// - Parameters:
/// - effect: visual effect, eg UIBlurEffect(style: .dark)
/// - intensity: custom intensity from 0.0 (no effect) to 1.0 (full effect) using linear scale
init(effect: UIVisualEffect, intensity: CGFloat) {