Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit for Graph cycle error testing. #103

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
50 changes: 50 additions & 0 deletions Demo/MultiplatformDemo/Test-Case_PRs/Case-102.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// iPhoneNumberFieldTest.swift
// Neuro20 PRO (iOS)
//
// Created by Emil Kaczmarek on 16/05/2024.
//

import iPhoneNumberField
import SwiftUI

@available(iOS 15.0, *) /// because of the `textInputAutocapitalization` modifier
struct iPhoneNumberFieldTestView: View {
var placeholderText: String
@Binding var mainText: String
var formX: CGFloat = 0
var formY: CGFloat = 0
var textXPos: CGFloat = 16
var mainForegroundColor: Color = .red
var cornerRadius: CGFloat = 4
var disabled: Bool = false
var borderColor: Color = Color.black

var body: some View {
iPhoneNumberField(placeholderText, text: $mainText)
.autofillPrefix(true)
.flagHidden(false)
.flagSelectable(true)
.prefixHidden(false)
.maximumDigits(10)
.clearsOnEditingBegan(true)
.clearsOnInsert(true)
.textInputAutocapitalization(.never)
.disabled(disabled)
.foregroundColor(mainForegroundColor)
.overlay(
RoundedRectangle(cornerRadius: cornerRadius)
.stroke(borderColor)
)
.frame(width: 200, height: 200)
.background(Color.white)
}
}

@available(iOS 15.0, *)
struct iPhoneNumberFieldTest: View {
@State var number: String = ""
var body: some View {
iPhoneNumberFieldTestView(placeholderText: "GOTACHA", mainText: $number)
}
}
12 changes: 12 additions & 0 deletions Demo/iPhoneNumberFieldDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
2A4F34632BF89D0500868921 /* Case-102.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4F34612BF89CDE00868921 /* Case-102.swift */; };
2AA44DC728A11687001BF8F0 /* MultiplatformDemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA44DC628A11687001BF8F0 /* MultiplatformDemoApp.swift */; };
2AA44DC928A11687001BF8F0 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA44DC828A11687001BF8F0 /* ContentView.swift */; };
2AA44DCB28A11688001BF8F0 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2AA44DCA28A11688001BF8F0 /* Assets.xcassets */; };
Expand All @@ -15,6 +16,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
2A4F34612BF89CDE00868921 /* Case-102.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Case-102.swift"; sourceTree = "<group>"; };
2AA44DC328A11687001BF8F0 /* iPhoneNumberFieldDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iPhoneNumberFieldDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
2AA44DC628A11687001BF8F0 /* MultiplatformDemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiplatformDemoApp.swift; sourceTree = "<group>"; };
2AA44DC828A11687001BF8F0 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand All @@ -36,6 +38,14 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
2A4F34622BF89CDE00868921 /* Test-Case_PRs */ = {
isa = PBXGroup;
children = (
2A4F34612BF89CDE00868921 /* Case-102.swift */,
);
path = "Test-Case_PRs";
sourceTree = "<group>";
};
2AA44DBA28A11687001BF8F0 = {
isa = PBXGroup;
children = (
Expand All @@ -57,6 +67,7 @@
2AA44DC528A11687001BF8F0 /* MultiplatformDemo */ = {
isa = PBXGroup;
children = (
2A4F34622BF89CDE00868921 /* Test-Case_PRs */,
2AA44DC628A11687001BF8F0 /* MultiplatformDemoApp.swift */,
2AA44DC828A11687001BF8F0 /* ContentView.swift */,
2AA44DCA28A11688001BF8F0 /* Assets.xcassets */,
Expand Down Expand Up @@ -162,6 +173,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2A4F34632BF89D0500868921 /* Case-102.swift in Sources */,
2AA44DC928A11687001BF8F0 /* ContentView.swift in Sources */,
2AA44DC728A11687001BF8F0 /* MultiplatformDemoApp.swift in Sources */,
);
Expand Down