Skip to content

Instantly share code, notes, and snippets.

View eytanschulman's full-sized avatar

Eytan Schulman eytanschulman

View GitHub Profile
@darrarski
darrarski / CustomIntensityVisualEffectView.swift
Last active July 22, 2024 06:14
UIVisualEffectView subclass that allows to customise effect intensity
// MIT License
//
// Copyright (c) 2017 Dariusz Rybicki Darrarski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@michaelevensen
michaelevensen / EmbedViewController.swift
Last active September 5, 2022 07:27
Embed a UIViewController in Container View programatically
// Instantiate
self.mapViewController = self.storyboard?.instantiateViewController(withIdentifier: "MapViewController") as? MapViewController
if let mapViewController = self.mapViewController {
// Add to Container View
self.mapViewContainerView.addSubview(mapViewController.view)
self.addChildViewController(mapViewController)
mapViewController.didMove(toParentViewController: self)
}
@keith
keith / link.sh
Last active December 22, 2016 13:35
Build to iOS 10 from Xcode 7.3.1
@JadenGeller
JadenGeller / ClockController.swift
Last active September 2, 2016 17:12
Clock Controller
import Foundation
// Controller that evokes its callback every minute
class ClockController {
private let minuteCallback: NSDate -> ()
init(minuteCallback: NSDate -> ()) {
self.minuteCallback = minuteCallback
callbackAndReschedule()
}