Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Eduardo Moreno Nava10,023 Points
what is the difference between a cocoa toach file and a swift file ?
sometimes in the classes Pasan use one or another but i havent found the difference between them.
Joshua Hawthorne18,523 Points
Cocoa Touch is a UI Framework used for building software programs to run on iOS. You can think of it as a swift file that comes "ready made" with a few things for you to use. For example, the UITableViewController Cocoa Touch object comes pre-filled with methods necessary to make the table view work. UICollectionViewController is another example.
A swift file is just that - an empty swift file. There is nothing pre-populated inside of it. Empty swift files are typically used for custom classes, structs, enums, etc. Once you start building more applications the difference will become apparent.