All Projects â†’ jeroenzonneveld â†’ SwiftUIFormHelper

jeroenzonneveld / SwiftUIFormHelper

Licence: MIT license
Helper functions for creating forms with SwiftUI

Programming Languages

swift
15916 projects

Labels

Projects that are alternatives of or similar to SwiftUIFormHelper

SwiftUIDrag
A simple, customizable, and intuitive SwiftUI wrapper-view enabling dragging, floating, and/or collapsing for its content.
Stars: ✭ 42 (+82.61%)
Mutual labels:  swiftui
NXNavigationExtension
đŸ”Ĩ Lightweight, simple, and easy-to-use NavigationBar library.
Stars: ✭ 121 (+426.09%)
Mutual labels:  swiftui
SwiftCurrent
A library for managing complex workflows in Swift
Stars: ✭ 286 (+1143.48%)
Mutual labels:  swiftui
SwiftUICalculator
A calculator app using SwiftUI which is introduced in WWDC19
Stars: ✭ 33 (+43.48%)
Mutual labels:  swiftui
kavsoft-swiftui-animations
SwiftUI animation tutorials, all of demos are consisted of youtube videos at website of kavsoft. 🔗 https://kavsoft.dev
Stars: ✭ 205 (+791.3%)
Mutual labels:  swiftui
Note.it
A Cut Down, Simple, Text Editor For Mac And iOS. Built With SwiftUI (Mostly).
Stars: ✭ 20 (-13.04%)
Mutual labels:  swiftui
Windows11
đŸ’ģ Windows 11 in SwiftUI.
Stars: ✭ 177 (+669.57%)
Mutual labels:  swiftui
Weekly-Challenge-2022-Swift
Retos semanales de la comunidad MoureDev para practicar Swift & iOS
Stars: ✭ 328 (+1326.09%)
Mutual labels:  swiftui
TokamakPublish
Use Tokamak in your Publish themes.
Stars: ✭ 19 (-17.39%)
Mutual labels:  swiftui
FootballDataSwiftUI
Display Football Data such as scores, upcoming match, team standing, top scorers with football Data API and SwiftUI
Stars: ✭ 76 (+230.43%)
Mutual labels:  swiftui
iOS-App
🕹ī¸ iOS application of HardcoreTap game
Stars: ✭ 17 (-26.09%)
Mutual labels:  swiftui
AVPlayer-SwiftUI
Using AVPlayer in SwiftUI
Stars: ✭ 204 (+786.96%)
Mutual labels:  swiftui
dashboard
iOS app + Today widget that monitors the status of my web apps. Updated for SwiftUI!
Stars: ✭ 41 (+78.26%)
Mutual labels:  swiftui
MultiplatformPlayground
Kotlin Multiplatform project in Jetpack Compose & SwiftUI with shared ViewModel layer and File upload
Stars: ✭ 72 (+213.04%)
Mutual labels:  swiftui
SwiftTheming
A powerful lightweight theme 🎨 manager for SwiftUI
Stars: ✭ 38 (+65.22%)
Mutual labels:  swiftui
CodeEditorView
SwiftUI code editor view for iOS and macOS
Stars: ✭ 461 (+1904.35%)
Mutual labels:  swiftui
SupportDocs
Generate help centers for your iOS apps. Hosted by GitHub and always up-to-date.
Stars: ✭ 135 (+486.96%)
Mutual labels:  swiftui
NukeUI
Lazy image loading for Apple platforms: SwiftUI, UIKit, AppKit
Stars: ✭ 9 (-60.87%)
Mutual labels:  swiftui
WeatherSwiftUI
Implementation of the Weather app using SwiftUI and OpenWeather API.
Stars: ✭ 37 (+60.87%)
Mutual labels:  swiftui
SwiftUI-bez
Utilities for working with bezier curves in SwiftUI
Stars: ✭ 80 (+247.83%)
Mutual labels:  swiftui

SwiftUIFormHelper

Helper functions for creating forms with SwiftUI

Installation

Swift Package Manager

Once you have your Swift package set up, adding SwiftUIFormHelper as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/jeroenzonneveld/SwiftUIFormHelper", .upToNextMajor(from: "1.3.1"))
]

Features

  • Helper to create some offset for the keyboard when visible
  • Helper to dismiss the keyboard when pressing on something different then a form field
  • FormValidator to validate input

Create offset for keyboard

Simply add the helper function .enableKeyboardOffset() after a Form.

import SwiftUI 
import SwiftUIFormHelper

Form {

}.enableKeyboardOffset()

Dismiss keyboard on tap

Simply add the helper function .hideKeyboardOnTap() after a Textfield.

import SwiftUI 
import SwiftUIFormHelper

Form {
    TextField("Name", text: $name)
        .hideKeyboardOnTap()
}

Form Validator

Validate input from fields. Currently supported:

  • isNotEmpty
  • isEmpty
  • hasMinimium(characters)
  • isValid
    • email
    • phoneNumber
    • url
import SwiftUIFormHelper

let email = "[email protected]"
FormValidator.isValid(email: email)

let phoneNumber = "+31612345678"
FormValidator.isValid(phoneNumber: phoneNumber)

let url = "apple.com"
FormValidator.isValid(url: url)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].