This file contains 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
var initalArray = [1, 2, 3] | |
let pointer: UnsafeMutablePointer<Int> = UnsafeMutablePointer(initalArray) | |
let arrary = Array(UnsafeBufferPointer(start: pointer, count: initalArray.count)) |
This file contains 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
// | |
// Swift-KVO | |
// | |
// Created by Jim Correia on 6/5/14. | |
// Copyright (c) 2014-2015 Jim Correia. All rights reserved. | |
// | |
// Update: 6/17/2014 | |
// | |
// KVOContext has gone away; use the same idiom you'd use from Objective-C for the context | |
// |