- Download Go: https://golang.org/dl/
- Create a
go
folder in local machine, in this case~/go
Note: all the go code should be inside this
go
folder
- Set your GOPATH
enum Route { | |
case modal | |
case tab(TabBarViewController.Tab) | |
init?(url: URL) { | |
switch url.absoluteString { | |
case "\(scheme)://tab1": self = .tab(.tab1) | |
case "\(scheme)://tab2": self = .tab(.tab2) | |
case "\(scheme)://modal": self = .modal | |
default: return nil |
func panGestureAction(_ panGesture: UIPanGestureRecognizer) { | |
let translation = panGesture.translation(in: view) | |
if panGesture.state == .began { | |
originalPosition = view.center | |
originalPositionNC = navigationController?.navigationBar.center | |
currentPositionTouched = panGesture.location(in: view) | |
} else if panGesture.state == .changed { | |
if (translation.y > 0){ | |
view.frame.origin = CGPoint( |
# Setup Git | |
git config --global alias.la '!git config -l | grep alias | cut -c 7-' | |
git config --global alias.br 'branch -vv' | |
git config --global alias.brd 'branch -D' | |
git config --global alias.cm 'commit -m' | |
git config --global alias.co 'checkout' | |
git config --global alias.coo 'checkout -' | |
git config --global alias.cob 'checkout -b' | |
git config --global alias.st 'status' | |
git config --global alias.pr 'pull --rebase upstream develop' |
go
folder in local machine, in this case ~/go
Note: all the go code should be inside this
go
folder
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let urlstring = "http://jsonplaceholder.typicode.com/posts" | |
Alamofire.request(urlstring).responseJSON { (data) in | |
let results = Mapper<Post>().mapArray(JSONObject: data.result.value) | |
for post in results! { | |
print(post.id) |
import UIKit | |
import ReactiveSwift | |
import Result | |
import ReactiveCocoa | |
class TestVC: UIViewController { | |
@IBOutlet weak var emailTextField : UITextField! | |
@IBOutlet weak var nameTextField : UITextField! | |
@IBOutlet weak var passTextField : UITextField! |