How Swift 2.0 Declare an abstract class?

We all know that in Java declare an abstract class or method you want to use the abstract keyword,But unfortunately familiar things always gone,In Swift has no label。

Then,How should we declare an abstract class it?

Private constructor (initializer) Act

It actually makes a very familiar, right? Bar private constructor of that class certainly can not be initialized,Nature can not create an object instance ...... but ...... but how can there be so many,Anyway, it can be used on the line!

Use Agreement Act

Anyway, the agreement is not allowed to be instantiated,We used to do it may be an abstract class ?

In short,That's it:


Original article written by Gerber drop-off:R0uter's Blog » How Swift 2.0 Declare an abstract class?

Reproduced Please keep the source and description link:

About the Author


The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a Reply

Your email address will not be published. Required fields are marked *