From 47dabf703296cd4b255ce0a661a91a0ca3dbf3c9 Mon Sep 17 00:00:00 2001 From: Alexis Drai Date: Fri, 12 May 2023 12:33:03 +0200 Subject: [PATCH] :construction: WIP --- PodcastsClone.xcodeproj/project.pbxproj | 4 +++ PodcastsClone/Views/EpisodeViewCell.swift | 28 +++++++++++++++++ PodcastsClone/Views/PodcastDetailView.swift | 33 +++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 PodcastsClone/Views/EpisodeViewCell.swift diff --git a/PodcastsClone.xcodeproj/project.pbxproj b/PodcastsClone.xcodeproj/project.pbxproj index 9d1d0f9..850cdee 100644 --- a/PodcastsClone.xcodeproj/project.pbxproj +++ b/PodcastsClone.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ ECB23B9A2A0E33B200A1C62B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ECB23B992A0E33B200A1C62B /* Preview Assets.xcassets */; }; ECB23BA12A0E3FDF00A1C62B /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB23BA02A0E3FDF00A1C62B /* MainView.swift */; }; ECB23BA32A0E455300A1C62B /* PodcastDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB23BA22A0E455300A1C62B /* PodcastDetailView.swift */; }; + ECB23BA62A0E4C0B00A1C62B /* EpisodeViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB23BA52A0E4C0B00A1C62B /* EpisodeViewCell.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -21,6 +22,7 @@ ECB23B992A0E33B200A1C62B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; ECB23BA02A0E3FDF00A1C62B /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; ECB23BA22A0E455300A1C62B /* PodcastDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodcastDetailView.swift; sourceTree = ""; }; + ECB23BA52A0E4C0B00A1C62B /* EpisodeViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EpisodeViewCell.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,6 +76,7 @@ children = ( ECB23BA02A0E3FDF00A1C62B /* MainView.swift */, ECB23BA22A0E455300A1C62B /* PodcastDetailView.swift */, + ECB23BA52A0E4C0B00A1C62B /* EpisodeViewCell.swift */, ); path = Views; sourceTree = ""; @@ -149,6 +152,7 @@ buildActionMask = 2147483647; files = ( ECB23BA12A0E3FDF00A1C62B /* MainView.swift in Sources */, + ECB23BA62A0E4C0B00A1C62B /* EpisodeViewCell.swift in Sources */, ECB23BA32A0E455300A1C62B /* PodcastDetailView.swift in Sources */, ECB23B932A0E33B000A1C62B /* PodcastsCloneApp.swift in Sources */, ); diff --git a/PodcastsClone/Views/EpisodeViewCell.swift b/PodcastsClone/Views/EpisodeViewCell.swift new file mode 100644 index 0000000..d636187 --- /dev/null +++ b/PodcastsClone/Views/EpisodeViewCell.swift @@ -0,0 +1,28 @@ +// +// PodcastEpisodeViewCell.swift +// PodcastsClone +// +// Created by etudiant on 2023-05-12. +// + +import SwiftUI + +struct PodcastEpisodeViewCell: View { + var body: some View { + // TODO add Divider() + + Text("Episode Title goes here") + // TODO add styles to episode title + + // TODO add subtitle info incl duration - podcast title - by: podcast author - episode description + + // TODO add play button and rounded time left (in hours, minutes...) + + } +} + +struct PodcastEpisodeViewCell_Previews: PreviewProvider { + static var previews: some View { + PodcastEpisodeViewCell() + } +} diff --git a/PodcastsClone/Views/PodcastDetailView.swift b/PodcastsClone/Views/PodcastDetailView.swift index b97b5d0..d20e541 100644 --- a/PodcastsClone/Views/PodcastDetailView.swift +++ b/PodcastsClone/Views/PodcastDetailView.swift @@ -11,8 +11,41 @@ struct PodcastDetailView: View { var body: some View { ScrollView { VStack(alignment: .leading) { + // TODO image goes here + + // TODO center this text + Text("Podcast Title goes here") + .font(.largeTitle) + .padding() + + // TODO center this text + Text("Author Name goes here") + .font(.title) + .foregroundColor(.secondary) + + // TODO add centered 'play' button that says "|> Latest Episode" + + Text("Latest Episode Description goes here") + // TODO make this just 3 lines, with a "MORE" touchable string that makes a full "about" page pop up? Or maybe the "MORE" string won't become clickable at all + + // TODO add star, rating /5, (nb review), mid-line '.', category, '.', frequency + + Divider() + + Text("Episodes") + .font(.title2) + .padding() + + VStack(alignment: .leading) { + Text("Episode View Cell goes here") + Text("Episode View Cell goes here") + Text("Episode View Cell goes here") + } + + } + .padding() } } }