Swift for c#Shops

But...Objective C? Objective C!

Objective C without the C

C# with Cocoa

C# vs Swift – Arrays

Objective C

NSArray *myArray = [[NSArray alloc] init];
NSArray *myArray = [[NSArray alloc] initWithObjects:@"one", @"two", @"three", nil];


var myArray = new string[];
var myArray = new []{“one”, “two”, “three”}


var myArray = String[]()
var myArray = [“one”, “two”, “three”]    

C# vs Swift – Functions

Objective C

- (string)sayHello:(string)name
 // do something


string sayHello(string name) {
    // do something


func sayHello(name: String) -> String {
    // do something


What next?

How to get it

Further Resources

Swift Language website .

Swift Programming Language: iBook  or PDF

Using Swift with Cocoa and Objective C:  iBook or PDF

Reddit and Medium communities

Swift at WWDC

Swift for C# Shops

By David Edgar

Swift for C# Shops

  • 733
Loading comments...