iOS Basics: UIKit, SwiftUI, and Core Data Quiz Quiz

  1. UIKit View Controller Identification

    In UIKit, which class is typically subclassed to create a screen or view controller in an iOS app?

    1. UIViewController
    2. UIWidgetController
    3. UIViewControler
    4. UIControlView
    5. ViewControllerUI
  2. SwiftUI View Structure

    Which keyword is used to declare the body of a SwiftUI view struct?

    1. var body: some View
    2. func bodyView()
    3. var bodyView: View
    4. let body: View
    5. body() -u003E View
  3. Core Data Persistent Storage

    What is the term for the object in Core Data that represents a single record or row in a database?

    1. NSManagedObject
    2. NSManagdObject
    3. CoreItem
    4. NSObjectManager
    5. DirectEntity
  4. UIKit Button Creation

    Which of the following creates a button in UIKit using Swift?

    1. UIButton(type: .system)
    2. UIToButton(type: .system)
    3. ButtonUIKit(style: .system)
    4. UIButtonMaker(.system)
    5. Button(type: .sys)
  5. SwiftUI State Properties

    In SwiftUI, which property wrapper is used to define a mutable value that belongs to a view, such as a score counter?

    1. @State
    2. @Observe
    3. @Binding
    4. @Variable
    5. @Publised
  6. Connecting Views in UIKit Storyboard

    What is the term for the line in Interface Builder that connects one scene to another, initiating a transition?

    1. Segue
    2. Seguee
    3. Transitioner
    4. Connecter
    5. Outlet
  7. Core Data Model Design

    In Core Data, which type defines the attributes and relationships of stored data?

    1. Entity
    2. Part
    3. Module
    4. ObjectType
    5. Dataclass
  8. Default List in SwiftUI

    Which view in SwiftUI is used to present a scrolling list of rows identified by a collection?

    1. List
    2. Scroll
    3. TableView
    4. RowList
    5. ItemView
  9. UIKit Label Text

    What property of UILabel is used to set the displayed text, such as showing the message 'Welcome!'?

    1. text
    2. valueText
    3. message
    4. setText
    5. label
  10. Saving Data in Core Data

    Which method is called on an NSManagedObjectContext to write any changes to the data store?

    1. save()
    2. commit()
    3. write()
    4. store()
    5. persist()