From 5c46b317c6d664487124529b3f61ba00c1599ed7 Mon Sep 17 00:00:00 2001 From: Sebastian Lenzlinger <74497638+sebaschi@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:13:28 +0200 Subject: [PATCH] Add New View for User Feed Entry creation --- RippleChat.xcodeproj/project.pbxproj | 8 ++++++++ RippleChat/NewFeedEntryView.swift | 25 +++++++++++++++++++++++++ RippleChat/TextApp.swift | 15 +++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 RippleChat/NewFeedEntryView.swift create mode 100644 RippleChat/TextApp.swift diff --git a/RippleChat.xcodeproj/project.pbxproj b/RippleChat.xcodeproj/project.pbxproj index 96cd019..289fc70 100644 --- a/RippleChat.xcodeproj/project.pbxproj +++ b/RippleChat.xcodeproj/project.pbxproj @@ -15,6 +15,8 @@ 96454F362A558EBE0040BEBD /* RippleChatUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96454F352A558EBE0040BEBD /* RippleChatUITests.swift */; }; 96454F382A558EBE0040BEBD /* RippleChatUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96454F372A558EBE0040BEBD /* RippleChatUITestsLaunchTests.swift */; }; 96454F452A5593900040BEBD /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = 96454F442A5593900040BEBD /* .gitignore */; }; + 96BD330E2A5C254B007A6E53 /* TextApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BD330D2A5C254B007A6E53 /* TextApp.swift */; }; + 96BD33102A5C27B0007A6E53 /* NewFeedEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BD330F2A5C27B0007A6E53 /* NewFeedEntryView.swift */; }; F581F59B2A5AE72F0081C383 /* BluetoothViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F581F59A2A5AE72F0081C383 /* BluetoothViewModel.swift */; }; F5847B622A599BF4009E28D4 /* Body.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5847B612A599BF4009E28D4 /* Body.swift */; }; F5847B642A599CC3009E28D4 /* LogEntry.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5847B632A599CC3009E28D4 /* LogEntry.swift */; }; @@ -52,6 +54,8 @@ 96454F352A558EBE0040BEBD /* RippleChatUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RippleChatUITests.swift; sourceTree = ""; }; 96454F372A558EBE0040BEBD /* RippleChatUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RippleChatUITestsLaunchTests.swift; sourceTree = ""; }; 96454F442A5593900040BEBD /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; + 96BD330D2A5C254B007A6E53 /* TextApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextApp.swift; sourceTree = ""; }; + 96BD330F2A5C27B0007A6E53 /* NewFeedEntryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewFeedEntryView.swift; sourceTree = ""; }; F581F59A2A5AE72F0081C383 /* BluetoothViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BluetoothViewModel.swift; sourceTree = ""; }; F5847B612A599BF4009E28D4 /* Body.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Body.swift; sourceTree = ""; }; F5847B632A599CC3009E28D4 /* LogEntry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogEntry.swift; sourceTree = ""; }; @@ -119,6 +123,8 @@ F5847B632A599CC3009E28D4 /* LogEntry.swift */, F5847B652A599EA4009E28D4 /* Feed.swift */, F5847B692A59AB24009E28D4 /* FeedStore.swift */, + 96BD330D2A5C254B007A6E53 /* TextApp.swift */, + 96BD330F2A5C27B0007A6E53 /* NewFeedEntryView.swift */, ); path = RippleChat; sourceTree = ""; @@ -283,9 +289,11 @@ F5847B622A599BF4009E28D4 /* Body.swift in Sources */, F5847B662A599EA4009E28D4 /* Feed.swift in Sources */, F5847B642A599CC3009E28D4 /* LogEntry.swift in Sources */, + 96BD33102A5C27B0007A6E53 /* NewFeedEntryView.swift in Sources */, F5847B6A2A59AB24009E28D4 /* FeedStore.swift in Sources */, F581F59B2A5AE72F0081C383 /* BluetoothViewModel.swift in Sources */, 96454F1D2A558EBC0040BEBD /* ContentView.swift in Sources */, + 96BD330E2A5C254B007A6E53 /* TextApp.swift in Sources */, 96454F1B2A558EBC0040BEBD /* RippleChatApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/RippleChat/NewFeedEntryView.swift b/RippleChat/NewFeedEntryView.swift new file mode 100644 index 0000000..3fc3978 --- /dev/null +++ b/RippleChat/NewFeedEntryView.swift @@ -0,0 +1,25 @@ +// +// NewFeedEntryView.swift +// RippleChat +// +// Created by Sebastian Lenzlinger on 10.07.23. +// + +import SwiftUI + +struct NewFeedEntryView: View { + @State private var name: String = "Alice" + + var body: some View { + VStack(alignment: .leading) { + TextField("Enter your name", text: $name) + Text("Hello, \(name)!") + } + } +} + +struct NewFeedEntryView_Previews: PreviewProvider { + static var previews: some View { + NewFeedEntryView() + } +} diff --git a/RippleChat/TextApp.swift b/RippleChat/TextApp.swift new file mode 100644 index 0000000..c489865 --- /dev/null +++ b/RippleChat/TextApp.swift @@ -0,0 +1,15 @@ +// +// TextApp.swift +// RippleChat +// +// Created by Sebastian Lenzlinger on 10.07.23. +// + +import Foundation + +struct TextApp { + + let t = Date() + let p: String + +}