Skip to content

Instantly share code, notes, and snippets.

@mackworth
mackworth / Obectivej-C to Swift Syntax Translation.md
Last active October 13, 2017 10:57
Table showing the major translations from Objective-C to Swift syntax

Conversion Process from Objective-C syntax to Swift The most important first step is to run Apple's "Convert to Modern Objective-C Syntax" refactoring, so that you're using array/dictionary literals and bracket-accesses; these will then be usable in Swift. Note also that I'm a beginner in Swift, so my apologies for any mistakes or incompleteness here.

When you see this pattern Replace with this
Module
@interface *newType* : *superType* <*protocol1*, *protocol2*> class *newType* : *superType*, *protocol1*, *protocol2*
@implementation OR @synthesize OR @end Delete
Properties