Skip to content

Instantly share code, notes, and snippets.

//
import UIKit
import UniformTypeIdentifiers
protocol TokenTextFieldDelegate: AnyObject {
func tokenizedTextField(_ sender: TokenTextField, didTapTokenView: UIView)
}
final class TokenTextField: UITextView {

Keybase proof

I hereby claim:

  • I am izhuster on github.
  • I am ishuster (https://keybase.io/ishuster) on keybase.
  • I have a public key ASB0macJ61HeyICeZKa7YYq10uWS4YFr3M737pHdNOQAdgo

To claim this, I am signing this object:

/*
I was doing a migration from Swift 2.3 to 3.0.1. When I encountered a String extension that converts a string number,
gives it a format, then returns the formatted string number.
The problem was, I changed to a NumberFormatter instance but the instance method asked me for a NSNumber.
I came with a solution and while it doesn't work for every value, it works for my use.
*/
// Old implementation
extension String {