Last active
January 30, 2021 21:53
-
-
Save uvolchyk/793b5c99fbb5cf51876b1d07aadc058c to your computer and use it in GitHub Desktop.
This file contains 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
struct News { | |
let title: String | |
let summary: String | |
let date: String | |
} | |
class ViewData { | |
private let raw: News | |
var expanded: Bool | |
var title: String { raw.title } | |
var summary: String { raw.summary } | |
var date: String { raw.date } | |
init(_ data: News) { | |
raw = data | |
expanded = false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment