Skip to content

Instantly share code, notes, and snippets.

@AppleCEO
Last active October 1, 2021 10:10
Show Gist options
  • Save AppleCEO/9a6fb0ea7c63dbcd95fa314891e913a7 to your computer and use it in GitHub Desktop.
Save AppleCEO/9a6fb0ea7c63dbcd95fa314891e913a7 to your computer and use it in GitHub Desktop.
class SmartPhone {
let inch: Double
init(inch: Double) {
self.inch = inch
}
func call(to: String) {
print("calling to \(to)")
}
func showYoutube() {
print("Watching Youtube")
}
}
protocol Foldable {
var isFolded: Bool { get }
}
class GalaxyFold: SmartPhone, Foldable {
var idsFolded: Bool = false
}
let galaxyFold = GalaxyFold(inch: 7.3)
galaxyFold.isFolded = true
galaxyFold.isFolded = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment