Skip to content

Instantly share code, notes, and snippets.

View Ilesh's full-sized avatar
:octocat:
Learn | Build | Test | 🚀

Ilesh Panchal Ilesh

:octocat:
Learn | Build | Test | 🚀
View GitHub Profile
@Ilesh
Ilesh / Blurable.swift
Created January 23, 2019 12:56 — forked from NikhilManapure/Blurable.swift
Blurable extension with blur and unBlur function
extension UIView {
func blur() {
let blurEffect = UIBlurEffect(style: UIBlurEffectStyle.light)
let blurEffectView = UIVisualEffectView(effect: blurEffect)
blurEffectView.frame = self.bounds
blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
self.addSubview(blurEffectView)
}
func unBlur() {
@IBDesignable class GridView: UIView {
var numberOfColumns: Int = 2
var numberOfRows: Int = 2
var lineWidth: CGFloat = 1.0
var lineColor: UIColor = UIColor.white
override func draw(_ rect: CGRect) {
if let context = UIGraphicsGetCurrentContext() {
@Ilesh
Ilesh / UIButton+AddTargetClosure.swift
Created January 4, 2019 05:22 — forked from jackywang135/UIButton+AddTargetClosure.swift
Add UIButton targets using closure
import UIKit
typealias UIButtonTargetClosure = UIButton -> ()
class ClosureWrapper: NSObject {
let closure: UIButtonTargetClosure
init(_ closure: UIButtonTargetClosure) {
self.closure = closure
}
}
public protocol RichTextEditorDelegate: class {
func textDidChange(text: String)
func heightDidChange()
}
fileprivate class WeakScriptMessageHandler: NSObject, WKScriptMessageHandler {
weak var delegate: WKScriptMessageHandler?
init(delegate: WKScriptMessageHandler) {
self.delegate = delegate
@Ilesh
Ilesh / Podfile
Last active February 11, 2020 12:55 — forked from arturgrigor/Podfile
Sample Podfile for silencing warnings for CocoaPods dependencies
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target '%TargetName%' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for %TargetName%
# pod 'FBSDKCoreKit'
end