Skip to content

Instantly share code, notes, and snippets.

View rebeloper's full-sized avatar
👋
rebeloper.com

Alex Nagy rebeloper

👋
rebeloper.com
View GitHub Profile
@darrarski
darrarski / CustomIntensityVisualEffectView.swift
Last active April 23, 2024 08:32
UIVisualEffectView subclass that allows to customise effect intensity
import UIKit
final 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) {
theEffect = effect
@ahbou
ahbou / ComposeView.swift
Last active July 12, 2019 03:30
iPhone X InputAccessoryView Fix
//
// ComposeView.swift
import UIKit
class ComposeView: UIView {
// ........
// Other layout code and methods
// ........
@khanlou
khanlou / Fonts.swift
Created October 6, 2016 21:10
Print all fonts in Swift 3
UIFont.familyNames.forEach({ familyName in
let fontNames = UIFont.fontNames(forFamilyName: familyName)
print(familyName, fontNames)
})
@gkoehler
gkoehler / ViewController.swift
Created November 12, 2015 13:23
UICollectionView: performBatchUpdates example
//
// ViewController.swift
// collView2
//
// Created by Gavin Koehler on 11/11/15.
// Copyright © 2015 From Now On, LLC. All rights reserved.
//
import UIKit