Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Difference between "import UIKit" and "import Foundation"

what's Foundation??

1 Answer

Those are two different SDK´s that Apple provides. Apple provides thousands of different SDK for handling different stuff. They don´t put all their functions in one file, because that file would be unnecessary big, they instead let you import only what you need. UIKit contains functions you can use in regards of the user interface. Foundation contains the core stuff you´ll need to make an app. You can read more about it here: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html