Skip to content

Instantly share code, notes, and snippets.

View spinach's full-sized avatar

Guy Daher spinach

View GitHub Profile
import UIKit
import SwiftyJSON
import PlaygroundSupport
struct User {
var emails: [String]
var userNameGithub: String
var name: String
init(emails: [String], userNameGithub: String, name: String) {
@spinach
spinach / visualConstraintsPlayground.swift
Last active June 2, 2017 13:10
Visual Format Layout constraints in Swift Playground
import UIKit
import PlaygroundSupport
let hostView = UIView()
hostView.frame = CGRect(x: 0, y: 0, width: 450, height: 820)
hostView.backgroundColor = UIColor.white
PlaygroundPage.current.liveView = hostView
let searchBar = UISearchBar(frame: .zero)