Once we actually create the file, however, we have an entirely different boiler plate set of code. When we click next, we are not given a choice on what file name our new file will have, but we still get to pick our save location. Download current and previous versions of Apple's iOS, iPadOS, macOS, watchOS, tvOS and audioOS firmware and receive notifications when new firmwares are released. Additionally, if our base class is some sort of view controller, we will be given the option of creating a companion XIB file (and choose what device it is for if we're doing an iOS app). We are asked to give our class a name, choose what its base class is, and pick a language. If we choose Cocoa Touch Class, however, we get an entirely different dialog. ![]() When we click "Create" from here, we simply get an empty(ish) Swift file with the name we picked.Īll that's dropped into the file is the boilerplate copyright information and an import Foundation line: // If we choose Swift File, the next dialog screen asks us to give our file a name and choose a save location. with that in mind, what is the difference between these two options? We can create a "Cocoa Touch Class" or a "Swift File" (or 7 different options). ![]() I know they are different coz they are different options for creating a file, yet they are the same. TL DR: They're not different types of classes.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |