swift - Syntax for method hiding -


what syntax method hiding in swift? i've tried bunch of options in playground, keep getting errors. haven't been able find documentation on either.

in superclass:

func performfunction() {      print("performing function...") } 

in subclass, tried couple different options not seem work

new func performfunction() {    print("function...") } 

and

func new performfunction() {    print("function...") } 

you're looking override keyword:

class subclass: parentclass {     override func performfunction() {         println("function...")     } } 

see the swift programming language: inheritance more info.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -