diff --git a/Instagram.xcodeproj/project.pbxproj b/Instagram.xcodeproj/project.pbxproj index 0fc7c5c..3c212ff 100644 --- a/Instagram.xcodeproj/project.pbxproj +++ b/Instagram.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ 70E4EE5A27AC92AC0084586B /* PostContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E4EE5927AC92AC0084586B /* PostContent.swift */; }; 70E4EE5C27AC99B40084586B /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E4EE5B27AC99B40084586B /* Post.swift */; }; 70E4EE5E27ACA03D0084586B /* TabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E4EE5D27ACA03D0084586B /* TabBar.swift */; }; + 70E4EE6227AD866B0084586B /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70E4EE6127AD866B0084586B /* HomeView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -58,6 +59,7 @@ 70E4EE5927AC92AC0084586B /* PostContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostContent.swift; sourceTree = ""; }; 70E4EE5B27AC99B40084586B /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = ""; }; 70E4EE5D27ACA03D0084586B /* TabBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBar.swift; sourceTree = ""; }; + 70E4EE6127AD866B0084586B /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -108,6 +110,7 @@ 70DDB57027A9E995002DB49A /* Instagram */ = { isa = PBXGroup; children = ( + 70E4EE6027AD861A0084586B /* views */, 70E4EE5F27AD85640084586B /* Components */, 70DDB57127A9E995002DB49A /* InstagramApp.swift */, 70DDB57327A9E995002DB49A /* ContentView.swift */, @@ -156,6 +159,14 @@ path = Components; sourceTree = ""; }; + 70E4EE6027AD861A0084586B /* views */ = { + isa = PBXGroup; + children = ( + 70E4EE6127AD866B0084586B /* HomeView.swift */, + ); + path = views; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -289,6 +300,7 @@ 70E4EE5E27ACA03D0084586B /* TabBar.swift in Sources */, 70E4EE5427AC8F380084586B /* Header.swift in Sources */, 70DDB57427A9E995002DB49A /* ContentView.swift in Sources */, + 70E4EE6227AD866B0084586B /* HomeView.swift in Sources */, 70E4EE5A27AC92AC0084586B /* PostContent.swift in Sources */, 70E4EE5C27AC99B40084586B /* Post.swift in Sources */, 70DDB57227A9E995002DB49A /* InstagramApp.swift in Sources */, diff --git a/Instagram.xcodeproj/project.xcworkspace/xcuserdata/amjadoudeh.xcuserdatad/UserInterfaceState.xcuserstate b/Instagram.xcodeproj/project.xcworkspace/xcuserdata/amjadoudeh.xcuserdatad/UserInterfaceState.xcuserstate index 317d6d3..32745b0 100644 Binary files a/Instagram.xcodeproj/project.xcworkspace/xcuserdata/amjadoudeh.xcuserdatad/UserInterfaceState.xcuserstate and b/Instagram.xcodeproj/project.xcworkspace/xcuserdata/amjadoudeh.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Instagram/Header.swift b/Instagram/Components/Header.swift similarity index 100% rename from Instagram/Header.swift rename to Instagram/Components/Header.swift diff --git a/Instagram/Post.swift b/Instagram/Components/Post.swift similarity index 100% rename from Instagram/Post.swift rename to Instagram/Components/Post.swift diff --git a/Instagram/Story.swift b/Instagram/Components/Story.swift similarity index 100% rename from Instagram/Story.swift rename to Instagram/Components/Story.swift diff --git a/Instagram/TabBar.swift b/Instagram/Components/TabBar.swift similarity index 100% rename from Instagram/TabBar.swift rename to Instagram/Components/TabBar.swift diff --git a/Instagram/ContentView.swift b/Instagram/ContentView.swift index 3eff1b3..f523544 100644 --- a/Instagram/ContentView.swift +++ b/Instagram/ContentView.swift @@ -9,19 +9,7 @@ import SwiftUI struct ContentView: View { var body: some View { - VStack(spacing: 0.0) { - Header() - ScrollView(.vertical, showsIndicators: true) - { - Stories() - Divider() - Post() - Post(image: "amjad2", description: "Viva flamenca") - Post(image: "dog", description: "My babay") - Post(image: "SC", description: "What's next in Music is first at SoundCloud") - } - TabBar() - } + TabBar() } } diff --git a/Instagram/views/HomeView.swift b/Instagram/views/HomeView.swift new file mode 100644 index 0000000..3406bfa --- /dev/null +++ b/Instagram/views/HomeView.swift @@ -0,0 +1,25 @@ +// +// HomeView.swift +// Instagram +// +// Created by Amjad Oudeh on 04.02.22. +// + +import SwiftUI + +struct HomeView: View { + var body: some View { + VStack(spacing: 0.0) { + Header() + ScrollView(.vertical, showsIndicators: true) + { + Stories() + Divider() + Post() + Post(image: "amjad2", description: "Viva flamenca") + Post(image: "dog", description: "My babay") + Post(image: "SC", description: "What's next in Music is first at SoundCloud") + } + } + } +}