iOS, tvOS, and macOS Playgrounds

When you start a new iOS or tvOS Playground, the Playground imports the UIKit framework. This gives us access to the UIKit framework that provides the core infrastructure for iOS and tvOS applications. When we start a new macOS Playground, the Playground imports the Cocoa framework.

What the last paragraph means is that, if we want to experiment with specific features of either UIKit or Cocoa, we will need to open the correct Playground. As an example, if we have an iOS Playground open and we want to create an object that represents a color, we would use a UIColor object. If we had a macOS playground open, we would use an NSColor object to represent a color.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset