From fdb3127c63b66b118c74aef34e3bb256cc4503a4 Mon Sep 17 00:00:00 2001 From: indextrown Date: Wed, 8 Apr 2026 23:56:55 +0900 Subject: [PATCH 1/9] =?UTF-8?q?feat:=20SKWebView=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SampleApp.xcodeproj/project.pbxproj | 4 +- .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/Contents.json | 0 .../{ => App}/Assets.xcassets/Contents.json | 0 .../SampleApp/{ => App}/SampleApp.swift | 2 +- .../SampleApp/SampleApp/App/TabBarView.swift | 33 ++++ .../SampleApp/SampleApp/ContentView.swift | 21 --- .../0. NativeListView/NativeListView.swift | 18 ++ .../0. WrapperListView/WrapperListView.swift | 26 +++ .../1. SKWebView/SampleSKWebView.swift | 25 +++ Sources/SwiftUI-Kit/Wrapper/SKWebView.swift | 8 - .../SKWebView/SKWebView+Modifier.swift | 110 +++++++++++ .../Wrapper/SKWebView/SKWebView.swift | 171 ++++++++++++++++++ 13 files changed, 386 insertions(+), 32 deletions(-) rename Examples/SampleApp/SampleApp/{ => App}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename Examples/SampleApp/SampleApp/{ => App}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename Examples/SampleApp/SampleApp/{ => App}/Assets.xcassets/Contents.json (100%) rename Examples/SampleApp/SampleApp/{ => App}/SampleApp.swift (88%) create mode 100644 Examples/SampleApp/SampleApp/App/TabBarView.swift delete mode 100644 Examples/SampleApp/SampleApp/ContentView.swift create mode 100644 Examples/SampleApp/SampleApp/View/Native/0. NativeListView/NativeListView.swift create mode 100644 Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift create mode 100644 Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift delete mode 100644 Sources/SwiftUI-Kit/Wrapper/SKWebView.swift create mode 100644 Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift create mode 100644 Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift diff --git a/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj b/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj index 0467635..726c0f9 100644 --- a/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj +++ b/Examples/SampleApp/SampleApp.xcodeproj/project.pbxproj @@ -270,7 +270,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -303,7 +303,7 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Examples/SampleApp/SampleApp/Assets.xcassets/AccentColor.colorset/Contents.json b/Examples/SampleApp/SampleApp/App/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Examples/SampleApp/SampleApp/Assets.xcassets/AccentColor.colorset/Contents.json rename to Examples/SampleApp/SampleApp/App/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Examples/SampleApp/SampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/Examples/SampleApp/SampleApp/App/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Examples/SampleApp/SampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Examples/SampleApp/SampleApp/App/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Examples/SampleApp/SampleApp/Assets.xcassets/Contents.json b/Examples/SampleApp/SampleApp/App/Assets.xcassets/Contents.json similarity index 100% rename from Examples/SampleApp/SampleApp/Assets.xcassets/Contents.json rename to Examples/SampleApp/SampleApp/App/Assets.xcassets/Contents.json diff --git a/Examples/SampleApp/SampleApp/SampleApp.swift b/Examples/SampleApp/SampleApp/App/SampleApp.swift similarity index 88% rename from Examples/SampleApp/SampleApp/SampleApp.swift rename to Examples/SampleApp/SampleApp/App/SampleApp.swift index a8b6dee..9864503 100644 --- a/Examples/SampleApp/SampleApp/SampleApp.swift +++ b/Examples/SampleApp/SampleApp/App/SampleApp.swift @@ -11,7 +11,7 @@ import SwiftUI struct SampleApp: App { var body: some Scene { WindowGroup { - ContentView() + TabBarView() } } } diff --git a/Examples/SampleApp/SampleApp/App/TabBarView.swift b/Examples/SampleApp/SampleApp/App/TabBarView.swift new file mode 100644 index 0000000..6913d9a --- /dev/null +++ b/Examples/SampleApp/SampleApp/App/TabBarView.swift @@ -0,0 +1,33 @@ +// +// TabBarView.swift +// SampleApp +// +// Created by 김동현 on 4/8/26. +// + +import SwiftUI +import SwiftUI_Kit + +struct TabBarView: View { + @State private var selectedTab: Int = 0 + var body: some View { + TabView(selection: $selectedTab) { + WrapperListView() + .tabItem { + Label("Wrapper", systemImage: "0.square.fill") + } + .tag(0) + + NativeListView() + .tabItem { + Label("Native", systemImage: "1.square.fill") + } + .tag(1) + } + } +} + +#Preview { + TabBarView() +} + diff --git a/Examples/SampleApp/SampleApp/ContentView.swift b/Examples/SampleApp/SampleApp/ContentView.swift deleted file mode 100644 index 347049f..0000000 --- a/Examples/SampleApp/SampleApp/ContentView.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// ContentView.swift -// SampleApp -// -// Created by 김동현 on 4/8/26. -// - -import SwiftUI -import SwiftUI_Kit - -struct ContentView: View { - var body: some View { - VStack { - SKSampleView() - } - } -} - -#Preview { - ContentView() -} diff --git a/Examples/SampleApp/SampleApp/View/Native/0. NativeListView/NativeListView.swift b/Examples/SampleApp/SampleApp/View/Native/0. NativeListView/NativeListView.swift new file mode 100644 index 0000000..c304e50 --- /dev/null +++ b/Examples/SampleApp/SampleApp/View/Native/0. NativeListView/NativeListView.swift @@ -0,0 +1,18 @@ +// +// NativeListView.swift +// SampleApp +// +// Created by 김동현 on 4/8/26. +// + +import SwiftUI + +struct NativeListView: View { + var body: some View { + Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/) + } +} + +#Preview { + NativeListView() +} diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift new file mode 100644 index 0000000..1e6348c --- /dev/null +++ b/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift @@ -0,0 +1,26 @@ +// +// WrapperListView.swift +// SampleApp +// +// Created by 김동현 on 4/8/26. +// + +import SwiftUI + +struct WrapperListView: View { + var body: some View { + NavigationStack { + List { + Section("") { + NavigationLink("SKWebView") { + SampleSKWebView() + } + } + } + } + } +} + +#Preview { + WrapperListView() +} diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift new file mode 100644 index 0000000..59008a9 --- /dev/null +++ b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift @@ -0,0 +1,25 @@ +// +// SampleSKWebView.swift +// SampleApp +// +// Created by 김동현 on 4/8/26. +// + +import SwiftUI +import SwiftUI_Kit + +struct SampleSKWebView: View { + var body: some View { + SKWebView(url: "https://www.naver.com") + .refreshable() + .refreshTitle("새로고침") + .refreshIndicatorColor(.blue) + .refreshTextColor(.blue) + .refreshIndicatorScale(1.0) + .ignoresSafeArea() + } +} + +#Preview { + SampleSKWebView() +} diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView.swift deleted file mode 100644 index a20d8c7..0000000 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// SKWebView.swift -// SwiftUI-Kit -// -// Created by 김동현 on 4/8/26. -// - -import Foundation diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift new file mode 100644 index 0000000..90c40db --- /dev/null +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift @@ -0,0 +1,110 @@ +// +// SKWebView+Modifier.swift +// SwiftUI-Kit +// +// Created by 김동현 on 4/8/26. +// + +import SwiftUI + +// MARK: - Modifier +public extension SKWebView { + + /// Pull to Refresh 기능을 활성화합니다. + /// + /// - Returns: 설정이 반영된 `SKWebView` + /// + /// 기본적으로 비활성화되어 있으며, 호출 시 활성화됩니다. + /// + /// ## Example + /// ```swift + /// SKWebView(url: url) + /// .refreshable() + /// ``` + func refreshable() -> Self { + var copy = self + copy.isRefreshEnabled = true + return copy + } + + /// Pull to Refresh 시 표시할 텍스트를 설정합니다. + /// + /// - Parameter text: 새로고침 시 상단에 표시될 문자열 + /// - Returns: 설정이 반영된 `SKWebView` + /// + /// ## Example + /// ```swift + /// SKWebView(url: url) + /// .refreshable() + /// .refreshTitle("새로고침 중...") + /// ``` + /// + /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. + func refreshTitle(_ text: String) -> Self { + var copy = self + copy.refreshText = text + return copy + } + + /// Pull to Refresh 텍스트의 색상을 설정합니다. + /// + /// - Parameter color: 텍스트에 적용할 색상 + /// - Returns: 설정이 반영된 `SKWebView` + /// + /// 기본값은 `.label`이며 시스템 다크/라이트 모드에 자동 대응됩니다. + /// + /// ## Example + /// ```swift + /// SKWebView(url: url) + /// .refreshable() + /// .refreshTextColor(.systemBlue) + /// ``` + /// + /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. + func refreshTextColor(_ color: UIColor) -> Self { + var copy = self + copy.refreshTextColor = color + return copy + } + + /// Pull to Refresh 인디케이터의 색상을 설정합니다. + /// + /// - Parameter color: 인디케이터에 적용할 색상 + /// - Returns: 설정이 반영된 `SKWebView` + /// + /// iOS의 `tintColor`에 해당하는 값입니다. + /// + /// ## Example + /// ```swift + /// SKWebView(url: url) + /// .refreshable() + /// .refreshIndicatorColor(.systemBlue) + /// ``` + /// + /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. + func refreshIndicatorColor(_ color: UIColor) -> Self { + var copy = self + copy.refreshIndicatorColor = color + return copy + } + + /// Pull to Refresh 인디케이터의 크기를 설정합니다. + /// + /// - Parameter scale: 인디케이터의 스케일 값입니다. 기본값은 `0.7`입니다. + /// - Returns: 설정이 반영된 `SKWebView` + /// + /// ## Example + /// ```swift + /// SKWebView(url: url) + /// .refreshable() + /// .refreshIndicatorScale(1.0) + /// ``` + /// + /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. + /// `CGAffineTransform`을 사용하여 크기를 조정합니다. + func refreshIndicatorScale(_ scale: CGFloat) -> Self { + var copy = self + copy.refreshScale = scale + return copy + } +} diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift new file mode 100644 index 0000000..848d62c --- /dev/null +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift @@ -0,0 +1,171 @@ +// +// SKWebView.swift +// SwiftUI-Kit +// +// Created by 김동현 on 4/8/26. +// + +import SwiftUI +import WebKit + +/// SwiftUI에서 `WKWebView`를 사용할 수 있도록 감싼 웹뷰 Wrapper 입니다. +/// +/// 기본적으로 아래 기능을 제공합니다. +/// - URL 로드 +/// - 선택적 Pull to Refresh +/// - `WKNavigationDelegate` +/// +/// ## 사용 예시 +/// ```swift +/// SKWebView(url: "https://www.naver.com") +/// .refreshable() +/// .refreshTitle("새로고침") +/// .refreshIndicatorColor(.blue) +/// .refreshTextColor(.blue) +/// .refreshIndicatorScale(1.0) +/// .ignoresSafeArea() +/// ``` +public struct SKWebView: UIViewRepresentable { + + // MARK: - Configuration + let url: String + var refreshText: String + var refreshTextColor: UIColor + var refreshIndicatorColor: UIColor + var refreshScale: CGFloat + var isRefreshEnabled: Bool + + public init(url: String) { + self.url = url + self.refreshText = "" + self.refreshTextColor = .label + self.refreshIndicatorColor = .label + self.refreshScale = 0.7 + self.isRefreshEnabled = false + } +} + +// MARK: - WebView Lifecycle +public extension SKWebView { + + /// UIKit View를 최초 1회 생성합니다. + /// + /// `makeUIView`는 실제 UIKit 뷰 인스턴스를 만드는 역할을 담당합니다. + /// `WKWebView`를 생성하고 초기 UI 설정을 적용합니다. + /// + /// - Parameter context: + /// - `Coordinator` 및 SwiftUI 환경 정보에 접근할 수 있는 컨텍스트 + /// - 추후 delegate 연결이나 상태 전달 시 활용 + /// + /// - Returns: 초기 설정이 적용된 `WKWebView` + func makeUIView(context: Context) -> WKWebView { + let webView = WKWebView(frame: .zero) + webView.navigationDelegate = context.coordinator + + if isRefreshEnabled { + + // Pull to Refresh 구성 + let refreshControl = UIRefreshControl() + + // 새로고침 시 보여줄 텍스트 스타일 지정 + refreshControl.attributedTitle = NSAttributedString( + string: refreshText, + attributes: [.foregroundColor: refreshTextColor] + ) + + // 인디케이터 색상 지정 + refreshControl.tintColor = refreshIndicatorColor + + // 인디케이터 크기 조절 + refreshControl.transform = CGAffineTransform( + scaleX: refreshScale, + y: refreshScale + ) + + // reload + refreshControl.addTarget( + context.coordinator, + action: #selector(Coordinator.handleRefresh), + for: .valueChanged + ) + + context.coordinator.webView = webView + context.coordinator.refreshControl = refreshControl + + webView.scrollView.refreshControl = refreshControl + webView.scrollView.bounces = true + } + return webView + } + + /// SwiftUI 상태가 변경될 때 기존 UIKit 뷰를 업데이트합니다. + /// + /// `updateUIView`는 이미 생성된 UIKit 뷰에 최신 SwiftUI 상태를 반영하는 역할을 합니다. + /// + /// - Parameters: + /// - uiView: 이미 생성된 `WKWebView` 인스턴스 + /// - context: `Coordinator` 및 SwiftUI 환경 정보에 접근할 수 있는 컨텍스트 + func updateUIView( + _ uiView: WKWebView, + context: Context + ) { + guard let requestURL = URL(string: url) else { return } + guard uiView.url?.absoluteString != requestURL.absoluteString else { return } + uiView.load(URLRequest(url: requestURL)) + } +} + +// MARK: - Coordinator +public extension SKWebView { + + /// SwiftUI와 UIKit 사이의 중간 객체인 Coordinator를 생성합니다. + /// `Coordinator`는 보통 다음과 같은 상황에서 사용됩니다. + /// - delegate / dataSource 연결 + /// - UIKit 이벤트를 SwiftUI 상태로 전달 + /// - 외부 객체와의 중간 브리지 역할 + /// + /// 현재 구현에서는 `WKNavigationDelegate`를 연결하기 위한 용도로만 사용하며, + /// 아직 별도의 상태 전달 로직은 포함되어 있지 않습니다. + /// + /// - Returns: `WKNavigationDelegate` 역할을 수행하는 `Coordinator` + func makeCoordinator() -> Coordinator { + return Coordinator() + } + + /// `WKWebView`의 네비게이션 관련 delegate 이벤트를 처리하는 객체입니다. + final class Coordinator: NSObject, WKNavigationDelegate { + weak var webView: WKWebView? + weak var refreshControl: UIRefreshControl? + + /// Pull to Refresh 발생 시 호출됩니다. + @objc func handleRefresh() { + webView?.reload() + } + + /// 페이지 로딩 완료 시 refresh 상태를 종료합니다. + public func webView( + _ webView: WKWebView, + didFinish navigation: WKNavigation! + ) { + refreshControl?.endRefreshing() + } + + /// 페이지 로딩 실패 시 refresh 상태를 종료합니다. + public func webView( + _ webView: WKWebView, + didFail navigation: WKNavigation!, + withError error: Error + ) { + refreshControl?.endRefreshing() + } + + /// 초기 로딩 실패 시 refresh 상태를 종료합니다. + public func webView( + _ webView: WKWebView, + didFailProvisionalNavigation navigation: WKNavigation!, + withError error: Error + ) { + refreshControl?.endRefreshing() + } + } +} From 75b2a98dd0abdcb13718417e38fea301f651797c Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 00:19:37 +0900 Subject: [PATCH 2/9] =?UTF-8?q?test:=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SKWebView/SKWebView+Modifier.swift | 4 +- .../Wrapper/SKWebView/SKWebView.swift | 14 ++-- Tests/SwiftUI-KitTests/SKWebViewTests.swift | 68 +++++++++++++++++++ 3 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 Tests/SwiftUI-KitTests/SKWebViewTests.swift diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift index 90c40db..53f0959 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift @@ -42,7 +42,7 @@ public extension SKWebView { /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. func refreshTitle(_ text: String) -> Self { var copy = self - copy.refreshText = text + copy.refreshTitle = text return copy } @@ -104,7 +104,7 @@ public extension SKWebView { /// `CGAffineTransform`을 사용하여 크기를 조정합니다. func refreshIndicatorScale(_ scale: CGFloat) -> Self { var copy = self - copy.refreshScale = scale + copy.refreshIndicatorScale = scale return copy } } diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift index 848d62c..1cf8635 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift @@ -29,18 +29,18 @@ public struct SKWebView: UIViewRepresentable { // MARK: - Configuration let url: String - var refreshText: String + var refreshTitle: String var refreshTextColor: UIColor var refreshIndicatorColor: UIColor - var refreshScale: CGFloat + var refreshIndicatorScale: CGFloat var isRefreshEnabled: Bool public init(url: String) { self.url = url - self.refreshText = "" + self.refreshTitle = "" self.refreshTextColor = .label self.refreshIndicatorColor = .label - self.refreshScale = 0.7 + self.refreshIndicatorScale = 0.7 self.isRefreshEnabled = false } } @@ -69,7 +69,7 @@ public extension SKWebView { // 새로고침 시 보여줄 텍스트 스타일 지정 refreshControl.attributedTitle = NSAttributedString( - string: refreshText, + string: refreshTitle, attributes: [.foregroundColor: refreshTextColor] ) @@ -78,8 +78,8 @@ public extension SKWebView { // 인디케이터 크기 조절 refreshControl.transform = CGAffineTransform( - scaleX: refreshScale, - y: refreshScale + scaleX: refreshIndicatorScale, + y: refreshIndicatorScale ) // reload diff --git a/Tests/SwiftUI-KitTests/SKWebViewTests.swift b/Tests/SwiftUI-KitTests/SKWebViewTests.swift new file mode 100644 index 0000000..45ce94a --- /dev/null +++ b/Tests/SwiftUI-KitTests/SKWebViewTests.swift @@ -0,0 +1,68 @@ +// +// SKWebViewTests.swift +// SwiftUI-Kit +// +// Created by 김동현 on 4/8/26. +// + +import Testing +@testable import SwiftUI_Kit + +@MainActor +struct SKWebViewTests { + + // MARK: - Modifier + @Test("refreshable()는 새로고침 기능을 활성화한다") + func refreshable_enableRefresh() { + let sut = SKWebView(url: "https://www.apple.com") + .refreshable() + #expect(sut.isRefreshEnabled == true) + } + + @Test("refreshTitle()은 새로고침 텍스트를 변경한다") + func refreshTitle_updatesText() { + let sut = SKWebView(url: "https://www.apple.com") + .refreshTitle("새로고침...") + #expect(sut.refreshTitle == "새로고침...") + } + + @Test("refreshTextColor()는 텍스트 색상을 변경한다") + func refreshTextColor_updatesColor() { + let sut = SKWebView(url: "https://www.apple.com") + .refreshTextColor(.systemBlue) + + #expect(sut.refreshTextColor == .systemBlue) + } + + @Test("refreshIndicatorColor()는 인디케이터 색상을 변경한다") + func refreshIndicatorColor_updatesColor() { + let sut = SKWebView(url: "https://www.apple.com") + .refreshIndicatorColor(.systemRed) + + #expect(sut.refreshIndicatorColor == .systemRed) + } + + @Test("refreshIndicatorScale()은 인디케이터 크기를 변경한다") + func refreshIndicatorScale_updatesScale() { + let sut = SKWebView(url: "https://www.apple.com") + .refreshIndicatorScale(1.0) + + #expect(sut.refreshIndicatorScale == 1.0) + } + + @Test("modifier는 체이닝되어 모든 설정값을 반영한다") + func modifiers_chain_appliesAllConfigurations() { + let sut = SKWebView(url: "https://www.apple.com") + .refreshable() + .refreshTitle("당겨서 새로고침") + .refreshTextColor(.systemBlue) + .refreshIndicatorColor(.systemGreen) + .refreshIndicatorScale(0.9) + + #expect(sut.isRefreshEnabled == true) + #expect(sut.refreshTitle == "당겨서 새로고침") + #expect(sut.refreshTextColor == .systemBlue) + #expect(sut.refreshIndicatorColor == .systemGreen) + #expect(sut.refreshIndicatorScale == 0.9) + } +} From 0845d02c3eb1c3aebc7d687c50521c0058c76781 Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 00:35:34 +0900 Subject: [PATCH 3/9] =?UTF-8?q?ci:=20coderabbit=20=EB=A6=AC=EB=B7=B0=20?= =?UTF-8?q?=ED=97=88=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .coderabbit.yaml | 2 +- .../1. SKWebView/SampleSKWebView.swift | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 3d57d54..ff9d7b0 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -116,7 +116,7 @@ reviews: drafts: true # 커밋이 추가될 때마다 변경된 부분만 자동으로 재리뷰 - auto_incremental_review: false + auto_incremental_review: true # ---------------------------------------------------------------- # # 채팅 기능 설정 diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift index 59008a9..c77cca4 100644 --- a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift +++ b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift @@ -5,6 +5,33 @@ // Created by 김동현 on 4/8/26. // + + + + + + + + + + + + + + + + + + + + + + + + + + + import SwiftUI import SwiftUI_Kit From 1dad0cee2af1fccb0275a4af7910a11c1ffed640 Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 12:32:11 +0900 Subject: [PATCH 4/9] =?UTF-8?q?fix:=20UIColor=20->=20Color=EB=A1=9C=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0. WrapperListView/WrapperListView.swift | 1 + .../1. SKWebView/SampleSKWebView.swift | 27 ------------------- .../SKWebView/SKWebView+Modifier.swift | 12 ++++----- 3 files changed, 7 insertions(+), 33 deletions(-) diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift index 1e6348c..3a964e9 100644 --- a/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift +++ b/Examples/SampleApp/SampleApp/View/Wrapper/0. WrapperListView/WrapperListView.swift @@ -14,6 +14,7 @@ struct WrapperListView: View { Section("") { NavigationLink("SKWebView") { SampleSKWebView() + .toolbar(.hidden, for: .tabBar) } } } diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift index c77cca4..59008a9 100644 --- a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift +++ b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift @@ -5,33 +5,6 @@ // Created by 김동현 on 4/8/26. // - - - - - - - - - - - - - - - - - - - - - - - - - - - import SwiftUI import SwiftUI_Kit diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift index 53f0959..a7a0ab9 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift @@ -57,13 +57,13 @@ public extension SKWebView { /// ```swift /// SKWebView(url: url) /// .refreshable() - /// .refreshTextColor(.systemBlue) + /// .refreshTextColor(.blue) /// ``` /// /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. - func refreshTextColor(_ color: UIColor) -> Self { + func refreshTextColor(_ color: Color) -> Self { var copy = self - copy.refreshTextColor = color + copy.refreshTextColor = UIColor(color) return copy } @@ -78,13 +78,13 @@ public extension SKWebView { /// ```swift /// SKWebView(url: url) /// .refreshable() - /// .refreshIndicatorColor(.systemBlue) + /// .refreshIndicatorColor(.blue) /// ``` /// /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. - func refreshIndicatorColor(_ color: UIColor) -> Self { + func refreshIndicatorColor(_ color: Color) -> Self { var copy = self - copy.refreshIndicatorColor = color + copy.refreshIndicatorColor = UIColor(color) return copy } From 3ca273fca2bce5ed15134c23842e63f0defd1e98 Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 12:43:41 +0900 Subject: [PATCH 5/9] =?UTF-8?q?ci:=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/{workflows => save}/email-notify.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => save}/email-notify.yml (100%) diff --git a/.github/workflows/email-notify.yml b/.github/save/email-notify.yml similarity index 100% rename from .github/workflows/email-notify.yml rename to .github/save/email-notify.yml From b2a65fc75e3f0e1deadcd6fe7c9b3aba792a3515 Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 12:53:58 +0900 Subject: [PATCH 6/9] =?UTF-8?q?test:=20UIColor=20->=20Color=EB=A1=9C=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=97=90=20=EB=94=B0=EB=9D=BC=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tests/SwiftUI-KitTests/SKWebViewTests.swift | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Tests/SwiftUI-KitTests/SKWebViewTests.swift b/Tests/SwiftUI-KitTests/SKWebViewTests.swift index 45ce94a..985b4aa 100644 --- a/Tests/SwiftUI-KitTests/SKWebViewTests.swift +++ b/Tests/SwiftUI-KitTests/SKWebViewTests.swift @@ -6,6 +6,7 @@ // import Testing +import UIKit @testable import SwiftUI_Kit @MainActor @@ -29,7 +30,7 @@ struct SKWebViewTests { @Test("refreshTextColor()는 텍스트 색상을 변경한다") func refreshTextColor_updatesColor() { let sut = SKWebView(url: "https://www.apple.com") - .refreshTextColor(.systemBlue) + .refreshTextColor(.blue) #expect(sut.refreshTextColor == .systemBlue) } @@ -37,9 +38,9 @@ struct SKWebViewTests { @Test("refreshIndicatorColor()는 인디케이터 색상을 변경한다") func refreshIndicatorColor_updatesColor() { let sut = SKWebView(url: "https://www.apple.com") - .refreshIndicatorColor(.systemRed) + .refreshIndicatorColor(.red) - #expect(sut.refreshIndicatorColor == .systemRed) + #expect(sut.refreshIndicatorColor == UIColor(.red)) } @Test("refreshIndicatorScale()은 인디케이터 크기를 변경한다") @@ -55,14 +56,14 @@ struct SKWebViewTests { let sut = SKWebView(url: "https://www.apple.com") .refreshable() .refreshTitle("당겨서 새로고침") - .refreshTextColor(.systemBlue) - .refreshIndicatorColor(.systemGreen) + .refreshTextColor(.blue) + .refreshIndicatorColor(.green) .refreshIndicatorScale(0.9) #expect(sut.isRefreshEnabled == true) #expect(sut.refreshTitle == "당겨서 새로고침") - #expect(sut.refreshTextColor == .systemBlue) - #expect(sut.refreshIndicatorColor == .systemGreen) + #expect(sut.refreshTextColor == UIColor(.blue)) + #expect(sut.refreshIndicatorColor == UIColor(.green)) #expect(sut.refreshIndicatorScale == 0.9) } } From 437c7bcbc09b5328cac49e9b8e51c371bf96132d Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 15:57:34 +0900 Subject: [PATCH 7/9] =?UTF-8?q?fix:=20url=20=ED=83=80=EC=9E=85=EC=9D=84=20?= =?UTF-8?q?String=20->=20URL=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Wrapper/1. SKWebView/SampleSKWebView.swift | 2 +- .../Wrapper/SKWebView/SKWebView.swift | 18 ++++++++++-------- Tests/SwiftUI-KitTests/SKWebViewTests.swift | 12 ++++++------ 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift index 59008a9..a0f76c1 100644 --- a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift +++ b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift @@ -10,7 +10,7 @@ import SwiftUI_Kit struct SampleSKWebView: View { var body: some View { - SKWebView(url: "https://www.naver.com") + SKWebView(url: URL(string: "https://www.naver.com")!) .refreshable() .refreshTitle("새로고침") .refreshIndicatorColor(.blue) diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift index 1cf8635..def90a1 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift @@ -8,16 +8,19 @@ import SwiftUI import WebKit -/// SwiftUI에서 `WKWebView`를 사용할 수 있도록 감싼 웹뷰 Wrapper 입니다. +/// SwiftUI에서 `WKWebView`를 사용할 수 있도록 감싼 웹뷰 래퍼입니다. +/// +/// `URL`을 입력받아 웹 페이지를 로드하며, +/// 필요에 따라 Pull to Refresh 기능을 활성화할 수 있습니다. /// /// 기본적으로 아래 기능을 제공합니다. /// - URL 로드 /// - 선택적 Pull to Refresh -/// - `WKNavigationDelegate` +/// - `WKNavigationDelegate` 연결 /// /// ## 사용 예시 /// ```swift -/// SKWebView(url: "https://www.naver.com") +/// SKWebView(url: URL(string: "https://www.naver.com")!) /// .refreshable() /// .refreshTitle("새로고침") /// .refreshIndicatorColor(.blue) @@ -28,14 +31,14 @@ import WebKit public struct SKWebView: UIViewRepresentable { // MARK: - Configuration - let url: String + let url: URL var refreshTitle: String var refreshTextColor: UIColor var refreshIndicatorColor: UIColor var refreshIndicatorScale: CGFloat var isRefreshEnabled: Bool - public init(url: String) { + public init(url: URL) { self.url = url self.refreshTitle = "" self.refreshTextColor = .label @@ -109,9 +112,8 @@ public extension SKWebView { _ uiView: WKWebView, context: Context ) { - guard let requestURL = URL(string: url) else { return } - guard uiView.url?.absoluteString != requestURL.absoluteString else { return } - uiView.load(URLRequest(url: requestURL)) + guard uiView.url != url else { return } + uiView.load(URLRequest(url: url)) } } diff --git a/Tests/SwiftUI-KitTests/SKWebViewTests.swift b/Tests/SwiftUI-KitTests/SKWebViewTests.swift index 985b4aa..3586ed8 100644 --- a/Tests/SwiftUI-KitTests/SKWebViewTests.swift +++ b/Tests/SwiftUI-KitTests/SKWebViewTests.swift @@ -15,21 +15,21 @@ struct SKWebViewTests { // MARK: - Modifier @Test("refreshable()는 새로고침 기능을 활성화한다") func refreshable_enableRefresh() { - let sut = SKWebView(url: "https://www.apple.com") + let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshable() #expect(sut.isRefreshEnabled == true) } @Test("refreshTitle()은 새로고침 텍스트를 변경한다") func refreshTitle_updatesText() { - let sut = SKWebView(url: "https://www.apple.com") + let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshTitle("새로고침...") #expect(sut.refreshTitle == "새로고침...") } @Test("refreshTextColor()는 텍스트 색상을 변경한다") func refreshTextColor_updatesColor() { - let sut = SKWebView(url: "https://www.apple.com") + let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshTextColor(.blue) #expect(sut.refreshTextColor == .systemBlue) @@ -37,7 +37,7 @@ struct SKWebViewTests { @Test("refreshIndicatorColor()는 인디케이터 색상을 변경한다") func refreshIndicatorColor_updatesColor() { - let sut = SKWebView(url: "https://www.apple.com") + let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshIndicatorColor(.red) #expect(sut.refreshIndicatorColor == UIColor(.red)) @@ -45,7 +45,7 @@ struct SKWebViewTests { @Test("refreshIndicatorScale()은 인디케이터 크기를 변경한다") func refreshIndicatorScale_updatesScale() { - let sut = SKWebView(url: "https://www.apple.com") + let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshIndicatorScale(1.0) #expect(sut.refreshIndicatorScale == 1.0) @@ -53,7 +53,7 @@ struct SKWebViewTests { @Test("modifier는 체이닝되어 모든 설정값을 반영한다") func modifiers_chain_appliesAllConfigurations() { - let sut = SKWebView(url: "https://www.apple.com") + let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshable() .refreshTitle("당겨서 새로고침") .refreshTextColor(.blue) From 5fdb0a4d1d5091cb78eb864e7d4b729a1ba9f12f Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 16:00:47 +0900 Subject: [PATCH 8/9] =?UTF-8?q?fix:=20refreshTitle=20->=20refreshText=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Wrapper/1. SKWebView/SampleSKWebView.swift | 2 +- .../Wrapper/SKWebView/SKWebView+Modifier.swift | 4 ++-- Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift | 8 ++++---- Tests/SwiftUI-KitTests/SKWebViewTests.swift | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift index a0f76c1..2f34362 100644 --- a/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift +++ b/Examples/SampleApp/SampleApp/View/Wrapper/1. SKWebView/SampleSKWebView.swift @@ -12,7 +12,7 @@ struct SampleSKWebView: View { var body: some View { SKWebView(url: URL(string: "https://www.naver.com")!) .refreshable() - .refreshTitle("새로고침") + .refreshText("새로고침") .refreshIndicatorColor(.blue) .refreshTextColor(.blue) .refreshIndicatorScale(1.0) diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift index a7a0ab9..4bbf1fc 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift @@ -40,9 +40,9 @@ public extension SKWebView { /// ``` /// /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다. - func refreshTitle(_ text: String) -> Self { + func refreshText(_ text: String) -> Self { var copy = self - copy.refreshTitle = text + copy.refreshText = text return copy } diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift index def90a1..5788804 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView.swift @@ -22,7 +22,7 @@ import WebKit /// ```swift /// SKWebView(url: URL(string: "https://www.naver.com")!) /// .refreshable() -/// .refreshTitle("새로고침") +/// .refreshText("새로고침") /// .refreshIndicatorColor(.blue) /// .refreshTextColor(.blue) /// .refreshIndicatorScale(1.0) @@ -32,7 +32,7 @@ public struct SKWebView: UIViewRepresentable { // MARK: - Configuration let url: URL - var refreshTitle: String + var refreshText: String var refreshTextColor: UIColor var refreshIndicatorColor: UIColor var refreshIndicatorScale: CGFloat @@ -40,7 +40,7 @@ public struct SKWebView: UIViewRepresentable { public init(url: URL) { self.url = url - self.refreshTitle = "" + self.refreshText = "" self.refreshTextColor = .label self.refreshIndicatorColor = .label self.refreshIndicatorScale = 0.7 @@ -72,7 +72,7 @@ public extension SKWebView { // 새로고침 시 보여줄 텍스트 스타일 지정 refreshControl.attributedTitle = NSAttributedString( - string: refreshTitle, + string: refreshText, attributes: [.foregroundColor: refreshTextColor] ) diff --git a/Tests/SwiftUI-KitTests/SKWebViewTests.swift b/Tests/SwiftUI-KitTests/SKWebViewTests.swift index 3586ed8..2272dd0 100644 --- a/Tests/SwiftUI-KitTests/SKWebViewTests.swift +++ b/Tests/SwiftUI-KitTests/SKWebViewTests.swift @@ -23,8 +23,8 @@ struct SKWebViewTests { @Test("refreshTitle()은 새로고침 텍스트를 변경한다") func refreshTitle_updatesText() { let sut = SKWebView(url: URL(string: "https://www.apple.com")!) - .refreshTitle("새로고침...") - #expect(sut.refreshTitle == "새로고침...") + .refreshText("새로고침...") + #expect(sut.refreshText == "새로고침...") } @Test("refreshTextColor()는 텍스트 색상을 변경한다") @@ -55,13 +55,13 @@ struct SKWebViewTests { func modifiers_chain_appliesAllConfigurations() { let sut = SKWebView(url: URL(string: "https://www.apple.com")!) .refreshable() - .refreshTitle("당겨서 새로고침") + .refreshText("당겨서 새로고침") .refreshTextColor(.blue) .refreshIndicatorColor(.green) .refreshIndicatorScale(0.9) #expect(sut.isRefreshEnabled == true) - #expect(sut.refreshTitle == "당겨서 새로고침") + #expect(sut.refreshText == "당겨서 새로고침") #expect(sut.refreshTextColor == UIColor(.blue)) #expect(sut.refreshIndicatorColor == UIColor(.green)) #expect(sut.refreshIndicatorScale == 0.9) From 1a160be5bc4044a221cfbb8230d97dae139b105a Mon Sep 17 00:00:00 2001 From: indextrown Date: Thu, 9 Apr 2026 16:13:28 +0900 Subject: [PATCH 9/9] =?UTF-8?q?fix:=20=EC=A3=BC=EC=84=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift index 4bbf1fc..886f22a 100644 --- a/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift +++ b/Sources/SwiftUI-Kit/Wrapper/SKWebView/SKWebView+Modifier.swift @@ -36,7 +36,7 @@ public extension SKWebView { /// ```swift /// SKWebView(url: url) /// .refreshable() - /// .refreshTitle("새로고침 중...") + /// .refreshText("새로고침 중...") /// ``` /// /// - Note: 이 설정은 `refreshable()`이 활성화된 경우에만 적용됩니다.