[![CI Status](http://img.shields.io/travis/Ben Palmer/BPBorderView.svg?style=flat)](https://travis-ci.org/Ben Palmer/BPBorderView)
A simple UIView subclass which takes some flags on initialization for easy set up of border subviews.
BPBorderView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "BPBorderView"
To run the example project, clone the repo, and run pod install
from the Example directory first.
Import the pod wherever you may need the BPBorderView Subclass
#import <BPBorderView/BPBorderView.h>
Initialize a view with one of the two initializers
//use the simple initializer, defaults to 1px
BPBorderView *view = [[BPBorderView alloc]
initWithFrame:someRect
borderOrientationFlags:BPBorderViewOrientationRight];
//or set the color and border width as well
BPBorderView *view = [[BPBorderView alloc]
initWithFrame:someRect
borderOrientationFlags:BPBorderViewOrientationBottom
borderColor:[UIColor redColor]
borderWidth:1.0];
//use the bitwise OR to pile on more orientation options
BPBorderView *view2 = [[BPBorderView alloc]
initWithFrame:someRect
borderOrientationFlags:BPBorderViewOrientationRight
| BPBorderViewOrientationLeft
| BPBorderViewOrientationBottom
| BPBorderViewOrientationTop];
Put borders on all the things!
Ben Palmer, benj.c.palmer@gmail.com
BPBorderView is available under the MIT license. See the LICENSE file for more info.