I try to create myPet by inherit from two classes but error for example:
import UIKit
class SecondViewController: UIViewController, UITextFieldDelegate {
Swift does not support multiple inheritance, following Objective C in this. This is NOT inheritance from two classes:
class SecondViewController: UIViewController, UITextFieldDelegate
It is inheritance from one class UIViewController
and adopting the UITextFieldDelegate
protocol. Read about protocols at https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html