Skip to content

Commit 26ad22c

Browse files
committed
update
1 parent a7f887b commit 26ad22c

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

openai-async-image-swiftui-example.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
783D05BA29AE2B5100C5D2B0 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 783D05B929AE2B5100C5D2B0 /* README.md */; };
1515
783D05C329AF609C00C5D2B0 /* sun_iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 783D05C229AF609C00C5D2B0 /* sun_iphone.png */; };
1616
785C65B92C9DE0E600F94362 /* openai-async-image-swiftui in Frameworks */ = {isa = PBXBuildFile; productRef = 785C65B82C9DE0E600F94362 /* openai-async-image-swiftui */; };
17+
786795EF2CF5D14500352F7A /* RoundedTextFieldStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 786795EE2CF5D14300352F7A /* RoundedTextFieldStyle.swift */; };
1718
78976E202C3AE11F00791CC3 /* TextWithLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78976E1F2C3AE11F00791CC3 /* TextWithLinks.swift */; };
1819
/* End PBXBuildFile section */
1920

@@ -26,6 +27,7 @@
2627
783CE14329A0C87800A88982 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
2728
783D05B929AE2B5100C5D2B0 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
2829
783D05C229AF609C00C5D2B0 /* sun_iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sun_iphone.png; sourceTree = "<group>"; };
30+
786795EE2CF5D14300352F7A /* RoundedTextFieldStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundedTextFieldStyle.swift; sourceTree = "<group>"; };
2931
78976E1F2C3AE11F00791CC3 /* TextWithLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextWithLinks.swift; sourceTree = "<group>"; };
3032
/* End PBXFileReference section */
3133

@@ -61,6 +63,7 @@
6163
783CE13A29A0C87600A88982 /* openai-async-image-swiftui-example */ = {
6264
isa = PBXGroup;
6365
children = (
66+
786795ED2CF5D13A00352F7A /* helper */,
6467
78976E212C3AE23000791CC3 /* view */,
6568
783D05C129AF608300C5D2B0 /* img */,
6669
783D05B929AE2B5100C5D2B0 /* README.md */,
@@ -96,6 +99,14 @@
9699
path = img;
97100
sourceTree = "<group>";
98101
};
102+
786795ED2CF5D13A00352F7A /* helper */ = {
103+
isa = PBXGroup;
104+
children = (
105+
786795EE2CF5D14300352F7A /* RoundedTextFieldStyle.swift */,
106+
);
107+
path = helper;
108+
sourceTree = "<group>";
109+
};
99110
78976E212C3AE23000791CC3 /* view */ = {
100111
isa = PBXGroup;
101112
children = (
@@ -183,6 +194,7 @@
183194
buildActionMask = 2147483647;
184195
files = (
185196
78976E202C3AE11F00791CC3 /* TextWithLinks.swift in Sources */,
197+
786795EF2CF5D14500352F7A /* RoundedTextFieldStyle.swift in Sources */,
186198
783CE13E29A0C87600A88982 /* ContentView.swift in Sources */,
187199
783CE13C29A0C87600A88982 /* openai_async_image_swiftui_exampleApp.swift in Sources */,
188200
);

openai-async-image-swiftui-example/ContentView.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,3 @@ struct ContentView: View {
5858
.ignoresSafeArea()
5959
}
6060
}
61-
62-
fileprivate struct RoundedTextFieldStyle: TextFieldStyle {
63-
func _body(configuration: TextField<Self._Label>) -> some View {
64-
configuration
65-
.padding(.vertical)
66-
.padding(.horizontal, 24)
67-
.background(.ultraThinMaterial)
68-
.clipShape(Capsule(style: .continuous))
69-
}
70-
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// RoundedTextFieldStyle.swift
3+
// openai-async-image-swiftui-example
4+
//
5+
// Created by Igor on 26.11.24.
6+
//
7+
8+
import SwiftUI
9+
10+
struct RoundedTextFieldStyle: TextFieldStyle {
11+
12+
func _body(configuration: TextField<Self._Label>) -> some View {
13+
configuration
14+
.padding(.vertical)
15+
.padding(.horizontal, 24)
16+
.background(.ultraThinMaterial)
17+
.clipShape(Capsule(style: .continuous))
18+
}
19+
}

0 commit comments

Comments
 (0)