In Objective-C the code looked liked this and worked flawlessly,
NSInteger random = arc4random_uniform(99) + 1 NSData *data = [NSData dataWithBytes:& ra
Like this:
var src: NSInteger = 2525 var out: NSInteger = 0 let data = NSData(bytes: &src, length: sizeof(NSInteger)) data.getBytes(&out, length: sizeof(NSInteger)) println(out) // ==> 2525