Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ struct ContentView: View {
$0.numberPlaceholderColor = .label
}
.padding()
.background(
RoundedRectangle(cornerRadius: 15)
.fill(Color(.secondarySystemGroupedBackground))
)
.padding()
}
}
}
Expand Down
21 changes: 21 additions & 0 deletions Demo/MultiplatformDemo/GitHubIssues/issue118.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import SwiftUI
import iPhoneNumberField

struct Issue118: View {
@State private var phoneNumber = ""
@State private var selectedCountry: String = "US"

var body: some View {
iPhoneNumberField("Phone Number", text: $phoneNumber)
.flagSelectable(true)
.defaultRegion(selectedCountry)
.formatted(true)
.prefixHidden(false)
.flagHidden(false)
}
}

#Preview {
Issue118()
.padding()
}
17 changes: 17 additions & 0 deletions Demo/MultiplatformDemo/GitHubIssues/issue119.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import SwiftUI
import iPhoneNumberField

/// Issue: When applying placeholderColor modifier, nothing happens. Placeholder color always the same.
///
/// This issue is due to a dependency. There is another PR for this [here](https://github.com/marmelroy/PhoneNumberKit/issues/831)
struct Issue119: View {
var body: some View {
iPhoneNumberField("Phone Number", text: .constant(""))
.placeholderColor(Color.red)
}
}

#Preview {
Issue119()
.padding()
}
27 changes: 27 additions & 0 deletions Demo/MultiplatformDemo/MultiplatformDemoApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// MultiplatformDemoApp.swift
// MultiplatformDemo
//
// Created by Seyed Mojtaba Hosseini Zeidabadi on 8/8/22.
//

import SwiftUI

@main
struct MultiplatformDemoApp: App {
private let issue: String?

init() {
let argument = ProcessInfo.processInfo.arguments.first { $0.hasPrefix("UIT-GHI-") }
self.issue = argument?.split(separator: "-").map(String.init).last
}

var body: some Scene {
WindowGroup {
switch issue {
case "118": Issue118()
default: ContentView()
}
}
}
}
Loading