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
12 changes: 12 additions & 0 deletions AsyncSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
C6F7798728C9CB3A0036773B /* StampView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F7798628C9CB3A0036773B /* StampView.swift */; };
C6F7798B28C9CBC60036773B /* EventView+Observed.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F7798A28C9CBC60036773B /* EventView+Observed.swift */; };
C6F7798D28C9CBD80036773B /* EventResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6F7798C28C9CBD80036773B /* EventResponse.swift */; };
E9E25D1E28CA554000986387 /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9E25D1D28CA554000986387 /* WebView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -39,6 +40,7 @@
C6F7798628C9CB3A0036773B /* StampView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StampView.swift; sourceTree = "<group>"; };
C6F7798A28C9CBC60036773B /* EventView+Observed.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EventView+Observed.swift"; sourceTree = "<group>"; };
C6F7798C28C9CBD80036773B /* EventResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventResponse.swift; sourceTree = "<group>"; };
E9E25D1D28CA554000986387 /* WebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -77,6 +79,7 @@
C68DE94A28C76CE000CA4CC8 /* Info.plist */,
C68DE93528C7685800CA4CC8 /* AsyncSwiftApp.swift */,
C68DE94B28C76F3200CA4CC8 /* AppDelegate.swift */,
E9E25D1F28CA554900986387 /* Extensions */,
C6F7798828C9CB9B0036773B /* Identifiable */,
C68DE95228C77F4800CA4CC8 /* Views */,
C6F7798928C9CBA60036773B /* Observed */,
Expand Down Expand Up @@ -123,6 +126,14 @@
path = Observed;
sourceTree = "<group>";
};
E9E25D1F28CA554900986387 /* Extensions */ = {
isa = PBXGroup;
children = (
E9E25D1D28CA554000986387 /* WebView.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -202,6 +213,7 @@
buildActionMask = 2147483647;
files = (
C68DE94C28C76F3200CA4CC8 /* AppDelegate.swift in Sources */,
E9E25D1E28CA554000986387 /* WebView.swift in Sources */,
C68DE95128C77DDA00CA4CC8 /* TicketingView.swift in Sources */,
C6F7798B28C9CBC60036773B /* EventView+Observed.swift in Sources */,
C6F7798728C9CB3A0036773B /* StampView.swift in Sources */,
Expand Down
27 changes: 27 additions & 0 deletions AsyncSwift/Extensions/WebView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// WebView.swift
// AsyncSwift
//
// Created by Eunyeong Kim on 2022/09/09.
//

import SwiftUI
import WebKit

struct WebView: UIViewRepresentable {

let url: String

func makeUIView(context: Context) -> WKWebView {
let webView = WKWebView()
webView.scrollView.isScrollEnabled = true

if let url = URL(string: url) {
webView.load(URLRequest(url: url))
}

return webView
}

func updateUIView(_ uiView: WKWebView, context: Context) {}
}
15 changes: 10 additions & 5 deletions AsyncSwift/Views/TicketingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
import SwiftUI

struct TicketingView: View {
private let upcomingEventURL = "https://www.eventbrite.com/e/asyncswift-seminar-002-tickets-408509251167"

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)

NavigationLink {
WebView(url: upcomingEventURL)
} label: {
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)
Expand Down