Currency text field formatter available for UIKit and SwiftUI 💶✏️

Overview

Build status Coverate status Swift Platform Swift Package Manager CocoaPods Compatible Twitter

CurrencyText provides lightweight libraries for formating text field text as currency, available for both UIKit and SwiftUI.

Its main core, the CurrencyFormatter class, can also be used a part from text fields to format any value that can be monetary represented.

If you need to present currency formatted text or allow users to input currency data, CurrencyText is going to help you do it in a readable and configurable matter.

Documentation

For details on how to use CurrencyText libraries please refer to the docs.

Installation

Swift Package Manager

To install it using Swift Package Manager, just add this repository through Xcode built-in Swift Packages, or by manually adding it to your Package.swift Package's dependencies:

dependencies: [
    .package(
    	url: "https://github.com/marinofelipe/CurrencyText.git", 
    	.upToNextMinor(from: .init(2, 1, 0)
    )
]

.target(
    name: "MyTarget",
    dependencies: [
    	// Can be imported to consume the formatter in insolation
        .target(name: "CurrencyFormatter"),

        // UIKit library - Provide access to "CurrencyFormatter" and "CurrencyUITextFieldDelegate" targets
        .target(name: "CurrencyText"),

        // SwiftUI library - Provide access to "CurrencyFormatter" and "CurrencyTextField" targets
        .target(name: "CurrencyTextSwiftUI")
    ],
    ...
)

Install via CocoaPods

To integrate CurrencyText using CocoaPods, specify it, one or more of its sub-specs in your Podfile:

# Podfile
use_frameworks!

target 'YOUR_TARGET_NAME' do
     pod 'CurrencyText'

     # sub-specs

     # pod 'CurrencyText/CurrencyFormatter'
     # pod 'CurrencyText/CurrencyUITextField'
     # pod 'CurrencyText/CurrencyTextField'
end

Contributing

Contributions and feedbacks are always welcome. Please feel free to fork, follow, open issues and pull requests. The issues, milestones, and what we are currently working on can be seen in the main Project.

Special Thanks

To @malcommac for his awesome work with SwiftRichString and SwiftDate, that inspired me when creating this project. Also to myanalysis for contributing so much by finding issues and giving nice suggestions.

Copyright

CurrencyText is released under the MIT license. See LICENSE for details.

Felipe Marino: [email protected], @_marinofelipe

Comments
  • Update example with 8 fields

    Update example with 8 fields

    New fields begin with no contents, and editing fields begin with some content to be edited.

    Why?

    Help us better see how the field reacts in multiple currencies and field configurations all at once.

    Changes

    Added 5 text fields in various configurations of initial values to just the example app.

    Tests

    Run the example app.

    Issue (optional) add link to the issue here

    All fields that do not contain initial values, but also have decimal values configured, where hasDecimal is set true, misbehave when the user types "1" then "2" in those fields.

    In Euros the value result is "10,02 €". The expected result is "0,12 €". In Dollars the value result is "$10.02". In Dollars the value result is "$0.12"

    So far I haven't noticed any other problems with editing or cursor.

    opened by CGKarnlund 13
  • Added passthrough delegate and improved cursor handling

    Added passthrough delegate and improved cursor handling

    Why?

    I discovered that setting a minimum dollar amount of 1 caused an extraneous 1 to appended to the user entered value on the first key press. This was caused by formatting, and enforcement of the minimum value, being applied to an empty field.

    I found that cursor handling was not working well. The cursor was leaping forward and backward 2 positions while entering and editing values.

    Changes

    Do not apply formatting to empty text from the text field. Only apply to the result of appending the newly entered character.

    To fix the cursor position I calculate the difference between the previous text and the newly formatted text and move the cursor to its correct new position by wrapping all text modifying actions in a cursor handler.

    Tests

    To create the issue start in the Example ViewController and change the formatter setup: $0.minValue = 1 $0.currency = .dollar $0.locale = CurrencyLocale.englishUnitedStates

    For the cursor testing I set formatter maxValue = 100000000, then I entered 12345678 in the example field. I then moved the cursor around with both the mouse and the arrow keys and used the delete key followed by a new number.

    We are currently using this new code in an enterprise app and it works great.

    Issue (optional) add link to the issue here

    opened by CGKarnlund 10
  • SwiftUI view not updated when currency value changed

    SwiftUI view not updated when currency value changed

    What problems I want to solve?

    If the CurrencyFormatter currency value is changed and re-rendered, the CurrencyTextField does not update with the new currency value.

    Example:

    struct SomeView: View {
        @State var currency: String
        @State var text: String
        @State var unformatted: String?
        @State var input: Double?
        
        var body: some View {
            Picker("Currency", selection: $currency) {
                ForEach(["EUR", "GBP", "USD"], id: \.self) { currency in
                    Text(currency)
                }
            }
            CurrencyTextField(
                configuration: .init(
                    placeholder: "0",
                    text: $text,
                    unformattedText: $unformatted,
                    inputAmount: $input,
                    formatter: CurrencyFormatter {
                        // HERE the View is not updated when `$currency` changes
                        $0.currency = Currency(rawValue: currency)!
                    },
                    textFieldConfiguration: { uiTextField in
                        // …
                    }
                )
            )
        }
    }
    

    change-currency-dynamically

    What value it delivers?

    It would allow to dynamically change the currency of the CurrencyTextField

    Tasks

    TBD

    Dependecies / References

    No dependencies and/or references by now.

    bug 
    opened by naoisegolden 9
  • Need a way to set the first focus for SwiftUI

    Need a way to set the first focus for SwiftUI

    Luckily there is a uiTextField callback provided and I can set it up by doing this, but it's very ugly

    
    textFieldConfiguration: { uiTextField in
                                    DispatchQueue.main.async {
                                        if !becomeFirstResponderCalled {
                                            uiTextField.becomeFirstResponder()
                                        }
                                        becomeFirstResponderCalled = true
                                    }
                                }
    
    

    If we can use it with https://developer.apple.com/documentation/swiftui/link/focused(_:)?changes=latest_minor, then great~~

    enhancement 
    opened by YeungKC 8
  • Investigate support for SwiftUI

    Investigate support for SwiftUI

    What problems I want to solve?

    The functionality provided by CurrencyText should be available not only on UIKit, but also on SwiftUI.

    I imagine CurrencyFormatter can still be used, but a separate library must be created to support using a currency formatter along with SwiftUI's TextField.

    help wanted work in progress feature 
    opened by marinofelipe 4
  • Decimal recognized as value

    Decimal recognized as value

    What problems I want to solve?

    Awesome Library The decimal place is recognized as values e.g

    1,200.00 is interpreted as 120000 which is wrong. Can there be a fix to this please

    opened by AdieOlami 3
  • Incorrect cursor position when editing

    Incorrect cursor position when editing

    Description

    As reported:

    The starting cursor positioning code hasn't been working for us when we fill the text field with a formatted currency string so the user can edit it. Under this condition, when the user taps the field the initial cursor position is forced to be somewhere in the middle of the string. So something similar to this "$123,|456".

    Setup to reproduce the issue: $0.minValue = 1 $0.currency = .dollar $0.locale = CurrencyLocale.englishUnitedStates $0.maxValue = 100000000 Text entered in the filed: 12345678

    Dependecies / References

    Reported by @CGKarnlund on #59

    bug 
    opened by marinofelipe 3
  • Feature/formatter binding

    Feature/formatter binding

    Why?

    Trying to fully resolve #87

    Changes

    Breaking: Make the formatter a Binding property on CurrencyTextFieldConfiguration, so changing it propagates an update on SwiftUI and then on updating the CurrencyTextField content.

    WIP

    • Still evaluating and testing the changes
    • Evaluating making bits of CurrencyFormatter Bindings in isolation, which would require a more complex update of the library and might be avoided at this moment

    Tests

    Tests updated to cover the scenario

    opened by marinofelipe 1
  • Fix formatter to be correctly updated on Swift UI

    Fix formatter to be correctly updated on Swift UI

    Why?

    #87

    Changes

    Fix WrappedTextFiled to update the formatter when updateConfigurationIfNeeded gets called. This aims to ensure SwiftUI updates have an effect on formatter changes.

    Tests

    Added a test to cover the scenario

    opened by marinofelipe 1
  • Feat: Improve focus/first responder handling in SwiftUI

    Feat: Improve focus/first responder handling in SwiftUI

    Why?

    To provide a better API for making CurrencyTextField the first responder in SwiftUI.

    Context

    CurrencyTextField is currently bridged from UIKit to SwiftUI, so iOS 15's focus API doesn't work for it. The only way to make a CurrencyTextField the first responder programmatically is as indicated by YeungKC on #81:

    textFieldConfiguration: { uiTextField in
        DispatchQueue.main.async {
            if !becomeFirstResponderCalled {
                uiTextField.becomeFirstResponder()
            }
            becomeFirstResponderCalled = true
        }
    }
    

    which is error prone and ugly.

    Changes

    This PR adds a new property to CurrencyTextFieldConfiguration called hasFocus, an OptionalBinding to drive an listen to the first responder state of a CurrencyTextField wrapped UITextField.

    The usage is as follows:

    struct SwiftUIExampleView2: View {
        @State private var hasFocus: Bool? = false // or this initially as true
        @State private var text = ""
    
        var body: some View {
            CurrencyTextField(
                configuration: .init(
                    placeholder: "type here...",
                    text: $text,
                    hasFocus: $hasFocus,
                    formatter: .default,
                    textFieldConfiguration: { uiTextField in
                        uiTextField.borderStyle = .roundedRect
                        uiTextField.font = UIFont.preferredFont(forTextStyle: .body)
                    },
                    onEditingChanged: { isEditing in
                        print("onEditingChanged: \(isEditing)")
                    },
                    onCommit: {
                        print("onCommit")
                    }
                )
            )
            .onAppear {
                hasFocus = true
            }
        }
    }
    

    Tests

    Tests were updated and CurrencyTextFieldConfigurationTests was extended.

    Related issue: #81

    opened by marinofelipe 1
  • Add Swift UI implementation

    Add Swift UI implementation

    Changes

    Introduce CurrencyTextField that conforms to UIViewRepresentable and bridges the UIKit implementation to SwiftUI, by creating UITextField that has a CurrencyUITextFieldDelegate instance as delegate.

    Decision context:

    • Bridging UIKit was needed since unfortunately Apple doesn't provide API for changing the selectedTextRange on TextField yet, which compromised a vanilla SwiftUI implementation given that defining the selected text range is important, mostly for formatters configured with currencies that have the currency symbol at the end
    • I wanted to make it possible to use CurrencyTextField without having to import UIKit, but fully wrapping UITextField wasn't feasible since once again Apple doesn't provide API to go from SwiftUI to UIKit, but mainly the opposite direction. What I mean by that, as a matter of exemplifying is:
    // UIViewRepresentable provides a function to update the underlying `uiView`
    func updateUIView(_ uiView: Self.UIViewType, context: Self.Context)
    
    // This function is called whenever there are updates, for example, 
    // when a modifier is used or in a new layout cycle done by SwiftUI
    CurrencyTextField()
       .font(.title)
       
    // triggers
    func updateUIView(_ uiView: Self.UIViewType, context: Self.Context) {
        context.environment.font // .title
    }
    // with font as part of context environment
    
    // it would be very nice to thus use this moment to update
    // the text field with given context changes, like font.
    // However Apple doesn't provide conversion from 
    // e.g. `Font` -> `UIFont` and other SwiftUI properties.
    // Therefore to avoid hacks and have an API that is still simple, 
    // the configuration of the textField is done via closure, 
    // which as downside requires the user to import UIKit
    
    import SwiftUI
    import UIKit
    
    CurrencyTextField(
        configuration: .init(
            placeholder: "Play with me...",
            text: $viewModel.data.text,
            unformattedText: $viewModel.data.unformatted,
            inputAmount: $viewModel.data.input,
            clearsWhenValueIsZero: true,
            formatter: .default,
            underlyingTextFieldConfiguration: { uiTextField in
                uiTextField.borderStyle = .roundedRect
                uiTextField.font = .systemFont(ofSize: 20)
                uiTextField.textColor = .blue
                uiTextField.layer.borderColor = UIColor.red.cgColor
                uiTextField.layer.borderWidth = 1
                uiTextField.layer.cornerRadius = 4
                uiTextField.layer.masksToBounds = true
            },
            onEditingChanged: { isEditing in
                bool = isEditing
                if isEditing == false {
                    // How to programmatically clear the text of CurrencyTextField:
                    // The Binding<String>.text that is passed into CurrencyTextField.configuration can
                    // manually cleared / updated with an empty String
                    clearTextFieldText()
                }
            },
            onCommit: {
                print("onCommit")
            }
        )
    )
    

    Additions

    • Declare new libraries via SPM and CocoaPods:
      • new library CurrencyTextSwiftUI defined on SPM
      • new CocoaPods sub-spec named CurrencyTextField
    • Update libraries to be built using Swift 5.3 toolchain - previously using Swift 5.0
    • Update to support from iOS 11.0 instead of 9.0
      • Since very few users are still on iOS 9 and 10 and the SnapshotTesting framework requires a min iOS 11 (Unfortunately SPM doesn't support defining a platform version on conditional target dependencies, yet?)

    Updates

    • Improves the ExampleApp with both UIKit and SwiftUI examples. The app was made Storyboardless.
    • Fix CurrencyFormatter.unformatted(string:) to correctly return the unformatted value when hasDecimals is true
    • Change CurrencyUITextFieldDelegate.textField(_:shouldChangeCharactersIn:replacementString:) -> Bool to call passthroughDelegate after updating text and selectedTextRange, when it was doing that before instead - This might be a breaking change for user relying on passthroughDelegate.

    WIP

    • [x] SwiftUI library documentation for public types
    • [x] Further manual validations of using the library via CocoaPods

    Post merge TODO

    • [x] Update on README and project documentation
    • [ ] Bump version and release

    Tests

    • Covered most parts with unit and snapshot tests

    #76

    opened by marinofelipe 1
  • Multiple SwiftUI Warnings on >iOS 16.X

    Multiple SwiftUI Warnings on >iOS 16.X

    What problems I want to solve?

    There are mutliple warnings on iOS >16.X while using your code: Publishing changes from within view updates is not allowed, this will cause undefined behavior.

    File: CurrencyText/tree/main/Sources Lines: 73, 122 and 124

    CleanShot 2022-11-20 at 01 50 20

    What value it delivers?

    There will be no more warnings while running the app. Improve stability.

    Tasks

    TBD

    Dependecies / References

    No dependencies and/or references by now.

    bug 
    opened by leafarenuk 1
  • Update `SwiftUI` libraries to vanilla SwiftUI + support all platforms

    Update `SwiftUI` libraries to vanilla SwiftUI + support all platforms

    Whenever Apple provides us with API for fully controlling TextFields selected text range, it will open the door for a plain vanilla SwiftUI version of CurrencyTextField and its libraries.

    As additional benefits all TextField modifiers will work nicely with CurrencyTextField, and support for all platforms will be possible given that importing UIKit won't be needed anymore.

    Let's see what WWDC and the next iteration of SwiftUI will give us 🤞 !

    Dependecies / References

    Apple 😜🙏

    enhancement 
    opened by marinofelipe 0
  • Improve Example app with different configurations

    Improve Example app with different configurations

    Description

    Improve clarity on the Example app. The idea is to showcase users how a different currency formatter setup affect the text field input formatting.

    e.g. adding pickers to change both currency and locale

    Dependecies / References

    Idea from @CGKarnlund on #59

    enhancement good first issue 
    opened by marinofelipe 0
  • Contribution MD

    Contribution MD

    What problems I want to solve?

    The repo does not have a contribution guideline file

    Tasks

    • [ ] Define and create contributing.md
    • [ ] Define and create pull_request.md
    enhancement type/docs 
    opened by marinofelipe 0
Releases(3.0.0)
  • 3.0.0(Jun 9, 2022)

    Breaking

    Change CurrencyTextFieldConfiguration.formatter to be a @Binding property, which aims to propagate state changes when the formatter is updated, like on formatter.currency changes.

    When bumping to this release, users will have to update their CurrencyTextField usages passing a projected value for their formatters, prefixed with $.

    CurrencyTextField(
        configuration: .init(
        // ...
        formatter: $currencyFormatter
    

    In order to update the bound formatter, it must be re-initialized with the desired properties, since the view update is only triggered when the Binding changes, in that case the formatter instance itself:

    CurrencyTextField(
    Picker(
        "Change currency",
        selection: $currency
    ) {
        ForEach(
           [
               Currency.euro,
               Currency.dollar,
               Currency.brazilianReal,
               Currency.yen
           ],
           id: \.self
        ) {
            Text($0.rawValue).tag($0)
        }
    }
    .pickerStyle(.segmented)
    .onChange(of: currency) { newValue in
         currencyFormatter = .init {
             $0.currency = newValue
             // other props
         }
    }
    

    For a full example, one case check the SwiftUIExampleView.swift on the Example app target, available in the CurrencyText.xcworkspace.

    Source code(tar.gz)
    Source code(zip)
  • 2.3.1(Jun 2, 2022)

  • 2.3.0(Mar 26, 2022)

    Added a new property to CurrencyTextFieldConfiguration called hasFocus, a Binding<Bool?> that can be used to control and observe focus/isFirstResponder changes for a CurrencyTextField wrapped UITextField. By default hasFocus is nil.

    The usage is as follows:

    struct MyView: View {
        @State private var hasFocus: Bool? // or this initially as true
    
        var body: some View {
            CurrencyTextField(
                configuration: .init(
                    text: $text,
                    hasFocus: $hasFocus,
                    // ...
                )
            )
            .onAppear {
                hasFocus = true
            }
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(May 9, 2021)

    This release added new libraries and API for formatting currency text in SwiftUI. For more detail please check the docs and the Example app.

    Obs: For now the SwiftUI libraries are only available for iOS given that the bridging between UIKit to SwiftUI required configuring an underlying UITextField. A future major version may provide SwiftUI support for all Apple platforms, in vanilla SwiftUI without the need to bridge from UIKit, whenever Apple provides us with API for fully controlling a SwiftUI.TextField selectedTextRange.

    Changes

    • Fixed CurrencyFormatter.unformatted(string:) when hasDecimals is true
    • Updated the ExampleApp with both UIKit and SwiftUI examples, and made it Storyboard-less
    • Increased min supported iOS version from 9.0 to 11.0
    • Updated from Swift 5.0 to Swift 5.3 toolchain
    • Added a SwiftPackage library CurrencyTextSwiftUI and CocoaPods sub-spec CurrencyTextField that provides access to SwiftUI.CurrencyTextField and CurrencyTextFieldConfiguration
    Source code(tar.gz)
    Source code(zip)
  • 2.1.2(Aug 5, 2020)

    • Fix #66 , by adjusting user inputed value to match formatter's defined range (min and/or max) only when the text field resign as first responder. This improves the experience by allowing users to freely type their currency text, without the value being e.g. initially adjusted from $ 0.01 to $ 2.00 - when currencyFormatter's min is 2.
    • Small improvements on the release lanes.
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Mar 15, 2020)

  • 2.1.0(Nov 3, 2019)

  • 2.0.6(Oct 3, 2019)

    • Update example layout.
    • Improve initial selected text range to be always after the last number, and to always at the end of the string.
    • Update CI to Xcode 11.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.5(Sep 30, 2019)

    PATCH

    • Update bundle dependencies;
    • Improve and adjust selected text range when the currency symbol is at the end of the text.
    • Update Example's layout.
    Source code(tar.gz)
    Source code(zip)
  • 2.0.4(Jul 5, 2019)

  • 2.0.3(Jul 5, 2019)

  • 2.0.2(Feb 17, 2019)

  • 2.0.1(Feb 17, 2019)

  • 2.0.0(Feb 16, 2019)

    MAJOR

    • Refactor CurrencyText to work based on an abstraction of number formatter for currency style, called CurrencyFormatter.
    • Improve API with much more clear and easy to use interface.
    • Documentation is hardly improved.
    • Allow users to use only the currency formatter.

    MINOR

    • Fix issue to format without decimal/fraction digits.
    • Add min and max options.
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Dec 31, 2018)

    MAJOR

    • Follow Apple's UITextField formatting section and use textField(_:shouldChangeCharactersIn:replacementString:) method to validate and format text.
    • Create a custom text field delegate and remove custom UITextField subclass.
    • Avoid subclassing UITextField with custom extendable UITextFieldDelegate class.

    MINOR

    • Swift 4.2
    • Remove CHANGELOG.md because it's usage only kept the commits of each version, what can be easily seen through commits and tags history.
    • Update demo interface with a larger and more visible text field.
    • Update CI setup to use Xcode 10.1 and latest fastlane version
    • Remove unused UITest target
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(May 13, 2018)

Owner
Felipe Lefèvre Marino
iOS Engineer. At the moment learning Rust. Also diving into functional programming.
Felipe Lefèvre Marino
UITextField that automatically formats text to display in the currency format

CurrencyTextField The numbers that the user enters in the field are automatically formatted to display in the dollar amount format. For example, if th

Richa Deshmukh 49 Sep 28, 2022
Focus text field in SwiftUI dynamically and progress through form using iOS keyboard.

Focuser Focuser allows to focus SwiftUI text fields dynamically and implements ability move go through the form using Keyboard for iOS 13 and iOS 14.

Art Technologies 118 Dec 25, 2022
A SwiftUI TextField with a prompt (or placeholder) that floats above the text field when active or not empty. Requires iOS 15.

FloatingPromptTextField A prompt is the label in a text field that informs the user about the kind of content the text field expects. In a default Tex

Emilio Peláez 43 Nov 3, 2022
Autocomplete for a text field in SwiftUI using async/await

Autocomplete for a text field in SwiftUI using async/await

Dmytro Anokhin 13 Oct 21, 2022
A beautiful and flexible text field control implementation of "Float Label Pattern". Written in Swift.

SkyFloatingLabelTextField SkyFloatingLabelTextField is a beautiful, flexible and customizable implementation of the space saving "Float Label Pattern"

Skyscanner 4k Jan 1, 2023
AEOTPTextField - A beautiful iOS OTP Text Field library, written in Swift with full access customization in UI.

AEOTPTextField - A beautiful iOS OTP Text Field library, written in Swift with full access customization in UI.

Abdelrhman Kamal 79 Jan 3, 2023
Text entry controls which contain a built-in title/label so that you don't have to add a separate title for each field.

FloatLabelFields Overview Installation Via Interface Builder Via Code Credits Additional References Questions Overview FloatLabelFields is the Swift i

Fahim Farook 1.2k Jan 4, 2023
Floating-textfield-swiftui - Floating textfield swiftui: Floating field with multiple icons

floating_textfield-swiftui Hey, Guys welcome to this tutorial. In this complete

Patrick 0 Jan 2, 2022
UITextField that support currency in the right way.

PLCurrencyTextField Summary PLCurrencyTextField provides simple and user friendly support for the amount in the currency. Usage To start using the com

Łukasz Śliwiński 96 Nov 14, 2022
RichTextKit is a Swift-based library for working with rich text in UIKit, AppKit and SwiftUI.

About RichTextKit RichTextKit is a Swift-based library that lets you work with rich text in UIKit, AppKit and SwiftUI. RichTextKit is under developmen

Daniel Saidi 282 Dec 28, 2022
Easy-to-use token field that is used in the Venmo app.

VENTokenField VENTokenField is the recipients token field that is used in the Venmo compose screen. Installation The easiest way to get started is to

Venmo 797 Dec 6, 2022
SwiftUI TextEdit View - A proof-of-concept text edit component in SwiftUI & CoreText.

A proof-of-concept text edit component in SwiftUI & CoreText. No UIKit, No AppKit, no UITextView/NSTextView/UITextField involved.

Marcin Krzyzanowski 80 Dec 1, 2022
Render Markdown text in SwiftUI

MarkdownUI MarkdownUI is a library for rendering Markdown in SwiftUI, fully compliant with the CommonMark Spec. Supported Platforms You can use the Ma

Guille Gonzalez 916 Jan 8, 2023
ExpandableText 😎 (SwiftUI) Expand the text with the "more" button

ExpandableText ?? (SwiftUI) Expand the text with the "more" button Get Started import SwiftUI import ExpandableText struct ExpandableText_Test: View

null 35 Dec 26, 2022
Transition from any SwiftUI Text view into an inline navigation bar title when the view is scrolled off-screen, as seen in Apple's TV & TestFlight iOS apps.

SwiftUI Matched Inline Title Transition from any SwiftUI Text view into an inline navigation bar title when the view is scrolled off-screen, as seen i

Seb Jachec 19 Oct 9, 2022
Render Markdown text in SwiftUI

Render Markdown text in SwiftUI. It is a preview based on the Marked implementation

小弟调调™ 26 Dec 20, 2022
Changes the color of the label text when the button is pressed and also prints hello to the console

MY FIRST APP App Description This app changes the color of the label text when the button is pressed and also prints "hello" to the console. App Walk-

null 0 Nov 29, 2021
UITextField and UITextView subclasses with placeholders that change into floating labels when the fields are populated with text.

Deprecated Please use JVFloatLabeledTextField instead or feel free to chime in on an issue if you'd like to take over the repo. RPFloatingPlaceholders

rob phillips 1.1k Jan 5, 2023
A text view that supports selection and expansion

The Problem UILabel and UITextView offer unsatisfying support for text selection. Existing solutions like TTTAttributedLabel are great but offer a som

Jeff Hurray 636 Dec 20, 2022