Jeff Burt

3pods

EvenlyWrappedLabel

EvenlyWrappedLabel is a UILabel subclass that will vertically distribute text or attributed text evenly across any number of lines, preventing text from grouping up at the top and also preventing single word orphans from taking up the entire bottom line.

Examples:

  1. This text:

    This sentence has a lot of words on the top line.

Becomes:

   This sentence has a lot
   of words on the top line.
  1. This text:

    This sentence has a single orphan.

Becomes:

   This sentence has
   a single orphan.

Features: - Works with all devices running iOS 9+. - Uses drawText(in:) internally (as opposed to creating subviews), so any UILabel reference can be replaced with EvenlyWrappedLabel and Everything Will Just Work™. - Works with any number of lines, any text alignment and attributed text. - Works with autolayout and honors intrinsic sizing. - Works with labels created in code and in Interface Builder. - useEveryLine option to force shorter text to take up all available lines. - Example app with lots of real-time configurations that lets you see the text wrap as you type.

License: MIT

  • Swift

PinEntryView

PinEntryView is a customizable view written in Swift that can be used to confirm alphanumeric pins. Use cases include typing ACCEPT after reviewing Terms of Service and setting or confirming a passcode.

Features: - Supports AutoLayout and has intrinsic size. Optionally set a height to make the boxes taller or a width to add more inner spacing between boxes. - Fully configurable in Interface Builder (supports @IBDesignable and @IBInspectable) and code. - Customizable for many different use cases. - Example app to demonstrate the various configurations.

License: MIT

  • Swift