Skip to content

Commit

Permalink
RUM-7475 Address CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mariedm committed Dec 6, 2024
1 parent 2c8e1af commit d2a3288
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public enum Fixture: CaseIterable {
case .popups:
return UIStoryboard.basic.instantiateViewController(withIdentifier: "Popups")
case .swiftUI:
if #available(iOS 13.0, *) {
if #available(iOS 15.0, *) {
return UIHostingController(rootView: SwiftUIView())
} else {
return ErrorViewController(message: "`.swiftUI` fixture is only available on iOS 13+")
return ErrorViewController(message: "`.swiftUI` fixture is only available on iOS 15+")
}
//- Navigation Bars
case .navigationBars:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"images" : [
{
"filename" : "Flowers_1.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"filename" : "Flowers_1.pdf",
"idiom" : "universal"
}
],
"info" : {
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,27 @@

import SwiftUI

@available(iOS 13.0, *)
@available(iOS 15.0, *)
struct SwiftUIView: View {
var body: some View {
VStack(spacing: 10) {
Text("Hello, SwiftUI!")
.font(.headline)

if #available(iOS 14.0, *) {
if #available(iOS 15.0, *) {
Label("Label with Icon", systemImage: "star.fill")
.font(.subheadline)
.foregroundStyle(.secondary)
}
}
Label("Label with Icon", systemImage: "star.fill")
.font(.subheadline)
.foregroundStyle(.secondary)

TextField("Enter text", text: .constant("Placeholder text"))
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(8)

Button(action: {}) {
if #available(iOS 15.0, *) {
Text("SwiftUI Button")
.padding()
.foregroundStyle(.background)
.background(Color.blue)
.cornerRadius(8)
}
Text("SwiftUI Button")
.padding()
.foregroundStyle(.background)
.background(Color.blue)
.cornerRadius(8)
}

Divider()
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"hash":"3d49c0331f488fa86d8a7329aa3d51270c94254d"}
{"hash":"698a6d14f0816d6963ce1dca4da17457a2c56bfe"}

0 comments on commit d2a3288

Please sign in to comment.