TapeTextView 1.0.0

TapeTextView 1.0.0

Maintained by Annino_De_Petra.



TapeTextView

Introduction

TapeTextView is a UITextViewSubclass which gives you the opportunity to add a marker pen effect to your text.


Initialization

  • With Autolayout
let tapeView = TapeTextView()
tapeView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(tapeView)

tapeView.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
tapeView.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true

tapeView.attributedText = NSAttributedString(string: text, attributes: [.font: font])
tapeView.tapeColor = color
  • Without Autolayout
let tapeView = TapeTextView(frame: frame)
tapeView.attributedText = NSAttributedString(string: text, attributes: [.font: font])
tapeView.tapeColor = color
tapeView.autoresizeBasedOnTextLength = autoResize
view.addSubview(tapeView)

Features

You can control

  • the inclination of the marker effect via var degrees: CGFloat
  • the height factor of the marker effect via var heightFactor: CGFloat
  • the lineSpacing via var lineSpacing: CGFloat

Contributing

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local

Step 2

  • HACK AWAY! 🔨🔨🔨

Step 3


License

License

MIT license