Skip to content

Instantly share code, notes, and snippets.

View behrank's full-sized avatar
🍊

Behran Kankul behrank

🍊
View GitHub Profile
@behrank
behrank / QueueExample.swift
Created March 6, 2020 08:54
Queue enum example
Queue.main.execute {
//Perform a task asynchronously
}
Queue.background.execute {
//Perform a background task
}
Queue.userInteractive.execute {
//Perform an userInteractive task
@behrank
behrank / Queue.swift
Last active March 6, 2020 08:53
Queue
import Foundation
protocol ExecutableQueue {
var queue: DispatchQueue { get }
}
extension ExecutableQueue {
func execute(closure: @escaping () -> Void) {
queue.async(execute: closure)
import UIKit
import RacoonKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
//How to add subviews.
let firstView = UIView()
import UIKit
import RacoonKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
//How to add subviews.
let firstView = UIView()
import UIKit
import RacoonKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
//How to add subviews.
let firstView = UIView()
@behrank
behrank / API.swift
Last active August 29, 2015 14:09 — forked from higepon/API.swift
//
// API.swift
//
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
//
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
// YourProject-Bridging-Header.h
#import <FacebookSDK/FacebookSDK.h>
// AppDelegate.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
.