Skip to content

Instantly share code, notes, and snippets.

@alfredoxyanez
Last active September 27, 2019 18:38
Show Gist options
  • Save alfredoxyanez/860d9beb6d3071623bbc383e05212e0d to your computer and use it in GitHub Desktop.
Save alfredoxyanez/860d9beb6d3071623bbc383e05212e0d to your computer and use it in GitHub Desktop.
import SwiftUI
struct ContentView: View {
@ObservedObject var messagesObject = MessagesObject()
var body: some View {
NavigationView {
List(messagesObject.messages, id: \.id) {
message in
Text("\(message.lastMessage)")
}
.listStyle(GroupedListStyle())
.navigationBarTitle(Text("Messages"))
.navigationBarHidden(false)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment