Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

CraigSiemens/CESDividerView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CESDividerView

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 CESDividerView.

Usage

Programmatically

Create a new instance and set the type to CESDividerViewTypeHorizontal or CESDividerViewTypeVertical. This can be done using -initWithType:

CESDividerView *dividerView = [[CESDividerView alloc] initWithType:CESDividerViewTypeVertical];

or by setting the type property.

dividerView.type = CESDividerViewTypeHorizontal;

Storyboard/Xib

  1. Add a UIView.

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

    class

  3. To make layout easier, in the Size Inspector (⌥⌘5), set the intrinsic size to match the type of divider you want to create.

    intrinsic

  4. To make a vertical line, in the Identity Inspector (⌥⌘3), add a boolean runtime attribute called vertical.

    verical

Installation

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

pod "CESDividerView"

License

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

About

Create a one pixel line on any device

Resources

License

Stars

Watchers

Forks

Packages

No packages published