Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions AsyncSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
B2E1083128C9CD6900C3DD59 /* AppData.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E1083028C9CD6900C3DD59 /* AppData.swift */; };
C68DE93628C7685800CA4CC8 /* AsyncSwiftApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C68DE93528C7685800CA4CC8 /* AsyncSwiftApp.swift */; };
C68DE93828C7685800CA4CC8 /* MainTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C68DE93728C7685800CA4CC8 /* MainTabView.swift */; };
C68DE93A28C7685900CA4CC8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C68DE93928C7685900CA4CC8 /* Assets.xcassets */; };
Expand All @@ -23,6 +24,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
B2E1083028C9CD6900C3DD59 /* AppData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppData.swift; sourceTree = "<group>"; };
C68DE93228C7685800CA4CC8 /* AsyncSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AsyncSwift.app; sourceTree = BUILT_PRODUCTS_DIR; };
C68DE93528C7685800CA4CC8 /* AsyncSwiftApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncSwiftApp.swift; sourceTree = "<group>"; };
C68DE93728C7685800CA4CC8 /* MainTabView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -116,6 +118,7 @@
isa = PBXGroup;
children = (
C6F7798A28C9CBC60036773B /* EventView+Observed.swift */,
B2E1083028C9CD6900C3DD59 /* AppData.swift */,
);
path = Observed;
sourceTree = "<group>";
Expand Down Expand Up @@ -206,6 +209,7 @@
C68DE93828C7685800CA4CC8 /* MainTabView.swift in Sources */,
C68DE93628C7685800CA4CC8 /* AsyncSwiftApp.swift in Sources */,
C6F7798D28C9CBD80036773B /* EventResponse.swift in Sources */,
B2E1083128C9CD6900C3DD59 /* AppData.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -335,7 +339,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"AsyncSwift/Preview Content\"";
DEVELOPMENT_TEAM = 76AJ433CP5;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = AsyncSwift/Info.plist;
Expand Down Expand Up @@ -366,7 +370,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"AsyncSwift/Preview Content\"";
DEVELOPMENT_TEAM = 76AJ433CP5;
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = AsyncSwift/Info.plist;
Expand Down
15 changes: 15 additions & 0 deletions AsyncSwift/Assets.xcassets/Seminar002Ticket.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "Seminar002.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "UpcomingConference001.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
3 changes: 3 additions & 0 deletions AsyncSwift/AsyncSwiftApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ import SwiftUI
@main
struct AsyncSwiftApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
@ObservedObject var appData: AppData = AppData()

var body: some Scene {
WindowGroup {
MainTabView()
.environmentObject(appData)
}
}
}
1 change: 1 addition & 0 deletions AsyncSwift/Identifiable/EventResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
import Foundation

struct EventResponse: Codable, Identifiable {
let id: Int

}
21 changes: 21 additions & 0 deletions AsyncSwift/Observed/AppData.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// AppData.swift
// AsyncSwift
//
// Created by Inho Choi on 2022/09/08.
//

import UIKit

final class AppData: ObservableObject {
@Published var currentTab: Tab = .event

}


enum Tab: String {
case event
case ticketing
case stamp
}

19 changes: 6 additions & 13 deletions AsyncSwift/Views/MainTabView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,16 @@
import SwiftUI

struct MainTabView: View {
@EnvironmentObject var appData: AppData
var body: some View {
TabView {
EventView()
.tabItem {
Label("Event", systemImage: "calendar")
}

TicketingView()
.tabItem {
Label("Ticketing", systemImage: "banknote")
}
StampView()
.tabItem {
Label("Stamp", systemImage: "checkmark.square")
ForEach(Tab.allCases, id: \.self) { tab in
tab.view.tabItem {
Image(systemName: tab.systemImageName)
Text(tab.title)
}
}
}
}
}

struct ContentView_Previews: PreviewProvider {
Expand Down
31 changes: 24 additions & 7 deletions AsyncSwift/Views/TicketingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,30 @@
import SwiftUI

struct TicketingView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
var body: some View {
NavigationView {
ScrollView {
VStack(spacing: 30) {
Image("Seminar002Ticket")
.resizable()
.aspectRatio(contentMode: .fit)
.shadow(color: Color(.sRGB, red: 0, green: 0, blue: 0, opacity: 0.15), radius: 20, x: 0, y: 4)

Image("UpcomingConference001")
.resizable()
.aspectRatio(contentMode: .fit)
}
.aspectRatio(contentMode: .fit)
.padding(30)

}
.navigationTitle("Ticketing")
} // NavigationView
} // body
} // View

struct TicketView_Previews: PreviewProvider {
static var previews: some View {
TicketingView()
}
static var previews: some View {
TicketingView()
}
}