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
// | |
// SceneDelegate.swift | |
// SwiftUI Chat App | |
// | |
// Created by Nick Halavins on 10/11/19. | |
// Copyright © 2019 AntiChat, Inc. All rights reserved. | |
// | |
import UIKit | |
import SwiftUI |
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
// | |
// ContentView.swift | |
// SwiftUI Chat | |
// | |
// Created by Nick Halavins on 6/7/19. Updated 10/11/19 | |
// Copyright © 2019 AntiLand. All rights reserved. | |
// | |
import SwiftUI | |
// let's create a structure that will represent each message in chat |
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
// | |
// ChatController.swift | |
// SwiftUI Chat | |
// | |
// Created by Nick Halavins on 6/7/19. Updated 10/11/19 | |
// Copyright © 2019 AntiLand. All rights reserved. | |
// | |
import Combine | |
import SwiftUI |
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
// ChatRow will be a view similar to a Cell in standard Swift | |
struct ChatRow : View { | |
// we will need to access and represent the chatMessages here | |
var chatMessage: ChatMessage | |
// body - is the body of the view, just like the body of the first view we created when opened the project | |
var body: some View { | |
// HStack - is a horizontal stack. We let the SwiftUI know that we need to place | |
// all the following contents horizontally one after another |
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
// | |
// ContentView.swift | |
// SwiftUI Chat | |
// | |
// Created by Nick Halavins on 6/7/19. Updated 10/11/19 | |
// Copyright © 2019 AntiLand. All rights reserved. | |
// | |
import SwiftUI |