Created
March 3, 2021 14:32
-
-
Save andrew-codechimp/83f267cb9f807602d31a799db72d2b70 to your computer and use it in GitHub Desktop.
mypublications.swift
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
| final class MyPublications { | |
| var publications: [Publication] = [] | |
| private init() { | |
| self.publications.append(Publication( | |
| id: 0, | |
| publicationName: "Fruit News", | |
| latestHeadline: "Johnny Appleseed made CEO")) | |
| self.publications.append(Publication( | |
| id: 1, | |
| publicationName: "Bird Chat", | |
| latestHeadline: "Excitement about something new")) | |
| self.publications.append(Publication( | |
| id: 2, | |
| publicationName: "Coin Stats", | |
| latestHeadline: "Coins going up")) | |
| } | |
| static let shared = MyPublications() | |
| } | |
| struct Publication: Identifiable { | |
| var id: Int | |
| var publicationName: String | |
| var latestHeadline: String | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment