Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

abstract class in swift

class Animal {
    func sound() {}
}

class Cat: Animal {
    override func sound() {
        print("miauw")
    }
}

class Dog: Animal {
    override func sound() {
        print("woof")
    }
}
Source by cocoacasts.com #
 
PREVIOUS NEXT
Tagged: #abstract #class #swift
ADD COMMENT
Topic
Name
3+1 =