Swift: Playing with Foundation Objects

It’s interesting which foundation calls are built in and which are not. (This may change with beta iteration)

// Playing with Foundation objects

import UIKit

import Foundation


var str = NSHomeDirectory()



var array : AnyObject[] = []

array += 5

array += “hello”


// This doesn’t work

//array.indexOfObject(5) // nope


// These all work





Comments are closed.