Signal-iOS/Signal/test
Evan Hahn 53642df893 Format credit/debit card donation inputs
This formats the text users enter on the card donation screen. For
example, "4242424242424242" becomes "4242 4242 4242 4242".

It uses [the `textField(_:shouldChangeCharactersIn:replacementString:)`
method of `UITextFieldDelegate`][0] to accomplish this, and implements a
helper that can handle all the cases (inserting, deleting, replacing,
pasting, and so on).

Tested this in an iPhone 14 simulator and on a physical iOS 12 device.

[0]: https://developer.apple.com/documentation/uikit/uitextfielddelegate/1619599-textfield
2022-11-23 18:49:21 -06:00
..
Assets Improvements to PNG transcoding 2022-09-13 23:22:50 +00:00
attachments Change license to AGPL 2022-10-13 08:25:37 -05:00
contact Change license to AGPL 2022-10-13 08:25:37 -05:00
Groups Change license to AGPL 2022-10-13 08:25:37 -05:00
mocks Add all JobQueues to environment, via a wrapper 2022-11-09 14:08:44 -06:00
Models Change license to AGPL 2022-10-13 08:25:37 -05:00
Payments Hide Apple Pay UI when the server disallows your region 2022-11-10 16:19:47 -06:00
PerformanceTests Add all JobQueues to environment, via a wrapper 2022-11-09 14:08:44 -06:00
profiles Change license to AGPL 2022-10-13 08:25:37 -05:00
SSKTests Change license to AGPL 2022-10-13 08:25:37 -05:00
subscriptions Consolidate one-time & monthly donation screens 2022-11-08 16:27:50 -06:00
Supporting Files iOS 9 Support 2015-10-31 04:45:55 +01:00
util Change CVV placeholder for Amex cards 2022-11-23 11:02:35 -08:00
ViewControllers Format credit/debit card donation inputs 2022-11-23 18:49:21 -06:00
views/ImageEditor Change license to AGPL 2022-10-13 08:25:37 -05:00
AppDelegateTest.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
OWSDeviceProvisioningURLParserTest.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
PhoneNumberValidatorTest.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalBaseTest.h Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalBaseTest.m Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalBaseTest+Swift.swift Change license to AGPL 2022-10-13 08:25:37 -05:00
SignalTests-Bridging-Header.h Change license to AGPL 2022-10-13 08:25:37 -05:00