This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Order { | |
var _id; | |
var _reference; | |
var date; | |
var name; | |
var _vorname; | |
Order(this._id, this._reference, {this.date}); | |
Order.name(this._id, this._reference, {this.name = 'x'}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func jumpTo(URLString:String?) { | |
if let URL = NSURL.URLWithString(URLString!) { | |
UIApplication.sharedApplication().openURL(URL) | |
} | |
} | |
func emailTo(URLString:String?) { | |
if let URL = NSURL.URLWithString(URLString!) { | |
// "mailto:%@?subject=%@&body=%@" | |
let email = "mailto:\(URL)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array2D<T> { | |
let columns: Int | |
let rows: Int | |
var array: Array<T?> | |
init(columns: Int, rows: Int) { | |
self.columns = columns | |
self.rows = rows | |
array = Array<T?>(count: rows*columns, repeatedValue: nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App | |
{ | |
class var shared : App { | |
struct Static { | |
static let instance : App = App() | |
} | |
return Static.instance | |
} | |
init() { |