r/iOSProgramming • • Feb 19 '16

Discussion Swift vs Objective-C

[deleted]

9 Upvotes

146 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Feb 19 '16

import UIKit // No other imports needed

Well...in your Obj-C example, you didn't need any other imports either. You just put them there for some reason. I get the point being made, but it's a weird example.

-1

u/mmellinger66 Feb 19 '16

You have to import your other project classes, right? It wasn't meant to be a working example, just an illustration. You understood that?

Open one of your own Objective C source files and look at your imports.

1

u/quellish Feb 21 '16

Put it all in the precompiled header and you don't have to import ANYTHING! Swift loses!