DividerView 3.0

DividerView 3.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2018
SPMSupports SPM

Maintained by Craig Siemens.



  • By
  • Craig Siemens

DividerView

CI Status Version License Platform

Simplifies the creation of a one pixel line on any device.

  • Horizontal or vertical
  • Works with or without autolayout.
  • Can be created programmatically or in storyboards/xibs

Example

To run the example project, run pod try DividerView.

Usage

Programmatically

Create a new instance and set the axis to DividerAxis.horzontal or DividerAxis.vertical. This can be done with the init method DividerView(axis:).

let divider = DividerView(axis: .horizontal)

or by setting the type property.

divider.axis = DividerAxis.horzontal;

Storyboard/Xib

  1. Add a UIView.

  2. In the Identity Inspector (⌥⌘3), set the class to DividerView.

  3. You may also need to set the module to DividerView if it isnt set automatically.

    class

  4. In the Attribute Inspector (⌥⌘4), set the vertical option bool to match the type of divider you want to create (default is NO).

    verical

Installation

DividerView is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DividerView"

License

DividerView is available under the MIT license. See the LICENSE file for more info.