Skip to content

Instantly share code, notes, and snippets.

View augusteo's full-sized avatar

Victor augusteo

  • Zaibatsu Heavy Industries
  • Silicon Valley
View GitHub Profile
public string IdToString(string id)
{
switch(id)
{
case "A":
return "Agriculture, Forestry and Fishing (A)";
break;
case "B":
return "Mining (B)";
break;
What new feature of swift2 excites you the most?
How to implement DSD menubar icon slide highlight the phase name?
How to implement download progress bar of multiple concurrent files download?
How do you get a json data from a web service and how do you parse it?
Could you run us through protocol oriented programming?
---
swagger: '2.0'
info:
version: 0.0.0
title: Simple API
host: localhost:4567
paths:
/hello/{name}:
get:
description: greets the lucky user
require 'json'
MyApp.add_route('GET', '/hello/{name}', {
"resourcePath" => "/Default",
"summary" => "",
"nickname" => "greet_user",
"responseClass" => "inline_response_200",
"endpoint" => "/hello/{name}",
"notes" => "greets the lucky user",
override func viewDidLoad() {
super.viewDidLoad()
SwaggerClientAPI.basePath = "http://localhost:4567"
}
override func viewDidLoad() {
super.viewDidLoad()
SwaggerClientAPI.basePath = "http://localhost:4567"
SwaggerClientAPI.DefaultAPI.greetUser(name: "Melbourne").execute { (response, error) -> Void in
print(response!.body.message!)
}
}
override func viewDidLoad() {
super.viewDidLoad()
SwaggerClientAPI.basePath = "http://localhost:4567"
SwaggerClientAPI.DefaultAPI.greetUser(name: "Melbourne").execute { (response, error) -> Void in
print(response!.body.message!)
}
SwaggerClientAPI.DefaultAPI.sumTwo(first: 2, second: 4).execute { (response, error) -> Void in
print(response!.body.message!)
}
}
let blacklists = ["*://mail.google.com/*","*://outlook.office.com/*","*://gist.github.com/*"]
//
// ViewController.swift
// spreoSDKTest
//
// Created by Victor Augusteo on 26/9/16.
// Copyright © 2016 Victor Augusteo. All rights reserved.
//
import UIKit
import ReactiveCocoa
class ParentVC: UIViewController {
override func viewDidLoad() {
NotificationCenter.default.addObserver(self,
selector: #selector(ParentVC.handleModalDismissed),
name: NSNotification.Name(rawValue: "modalIsDimissed"),
object: nil)
}
func handleModalDismissed() {
// Do something