🚧 WIP on navigation stack

pull/1/head
Alexis Drai 2 years ago
parent 47dabf7032
commit 3fb273e6dd

@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
EC8CF6202A13A4F200BE6FD5 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC8CF61F2A13A4F200BE6FD5 /* Colors.xcassets */; };
EC8CF6232A13A59400BE6FD5 /* LibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */; };
EC8CF6252A13A7F000BE6FD5 /* Podcast.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8CF6242A13A7F000BE6FD5 /* Podcast.swift */; };
ECB23B932A0E33B000A1C62B /* PodcastsCloneApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB23B922A0E33B000A1C62B /* PodcastsCloneApp.swift */; };
ECB23B972A0E33B200A1C62B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ECB23B962A0E33B200A1C62B /* Assets.xcassets */; };
ECB23B9A2A0E33B200A1C62B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = ECB23B992A0E33B200A1C62B /* Preview Assets.xcassets */; };
@ -16,6 +19,9 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
EC8CF61F2A13A4F200BE6FD5 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = "<group>"; };
EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryView.swift; sourceTree = "<group>"; };
EC8CF6242A13A7F000BE6FD5 /* Podcast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Podcast.swift; sourceTree = "<group>"; };
ECB23B8F2A0E33B000A1C62B /* PodcastsClone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PodcastsClone.app; sourceTree = BUILT_PRODUCTS_DIR; };
ECB23B922A0E33B000A1C62B /* PodcastsCloneApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodcastsCloneApp.swift; sourceTree = "<group>"; };
ECB23B962A0E33B200A1C62B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@ -36,6 +42,14 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
EC8CF6212A13A57400BE6FD5 /* Model */ = {
isa = PBXGroup;
children = (
EC8CF6242A13A7F000BE6FD5 /* Podcast.swift */,
);
path = Model;
sourceTree = "<group>";
};
ECB23B862A0E33B000A1C62B = {
isa = PBXGroup;
children = (
@ -55,6 +69,8 @@
ECB23B912A0E33B000A1C62B /* PodcastsClone */ = {
isa = PBXGroup;
children = (
EC8CF6212A13A57400BE6FD5 /* Model */,
EC8CF61F2A13A4F200BE6FD5 /* Colors.xcassets */,
ECB23BA42A0E45CC00A1C62B /* Views */,
ECB23B922A0E33B000A1C62B /* PodcastsCloneApp.swift */,
ECB23B962A0E33B200A1C62B /* Assets.xcassets */,
@ -77,6 +93,7 @@
ECB23BA02A0E3FDF00A1C62B /* MainView.swift */,
ECB23BA22A0E455300A1C62B /* PodcastDetailView.swift */,
ECB23BA52A0E4C0B00A1C62B /* EpisodeViewCell.swift */,
EC8CF6222A13A59400BE6FD5 /* LibraryView.swift */,
);
path = Views;
sourceTree = "<group>";
@ -139,6 +156,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
EC8CF6202A13A4F200BE6FD5 /* Colors.xcassets in Resources */,
ECB23B9A2A0E33B200A1C62B /* Preview Assets.xcassets in Resources */,
ECB23B972A0E33B200A1C62B /* Assets.xcassets in Resources */,
);
@ -153,7 +171,9 @@
files = (
ECB23BA12A0E3FDF00A1C62B /* MainView.swift in Sources */,
ECB23BA62A0E4C0B00A1C62B /* EpisodeViewCell.swift in Sources */,
EC8CF6252A13A7F000BE6FD5 /* Podcast.swift in Sources */,
ECB23BA32A0E455300A1C62B /* PodcastDetailView.swift in Sources */,
EC8CF6232A13A59400BE6FD5 /* LibraryView.swift in Sources */,
ECB23B932A0E33B000A1C62B /* PodcastsCloneApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

@ -0,0 +1,20 @@
//
// Podcast.swift
// PodcastsClone
//
// Created by etudiant on 2023-05-16.
//
import Foundation
class Podcast {
var title: String
var length: Int
var id: Int
init(title: String = "test title", length: Int = 400, id: Int) {
self.title = title
self.length = length
self.id = id
}
}

@ -0,0 +1,36 @@
//
// LibraryView.swift
// PodcastsClone
//
// Created by etudiant on 2023-05-16.
//
import SwiftUI
struct LibraryView: View {
// some random stuff
var podcasts =
[
Podcast(id: 0),
Podcast(id: 1),
Podcast(id: 2)
];
var body: some View {
NavigationStack{
List(podcasts, id: \.id) { currentPodcast in
//PodcastDetailView(podcast: currentPodcast)
PodcastDetailView()
}
}
}
}
struct LibraryView_Previews: PreviewProvider {
static var previews: some View {
LibraryView()
}
}

@ -8,6 +8,7 @@
import SwiftUI
struct PodcastDetailView: View {
var body: some View {
ScrollView {
VStack(alignment: .leading) {

Loading…
Cancel
Save