Created
October 15, 2018 11:21
-
-
Save vialyx/bfe78b89492b75a62dc6fda171b4b4ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Media { | |
var url: String | |
init(url: String) { | |
self.url = url | |
} | |
} | |
class Video: Media { | |
var thumb: String | |
init(url: String, thumb: String) { | |
self.thumb = thumb | |
super.init(url: url) | |
} | |
} | |
let media: Media = Video(url: "http://[email protected]", thumb: "http://[email protected]") | |
print("Media is Video? \(media is Video)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment