Skip to content

ben-p-commits/BPBorderView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPBorderView

[![CI Status](http://img.shields.io/travis/Ben Palmer/BPBorderView.svg?style=flat)](https://travis-ci.org/Ben Palmer/BPBorderView) Version License Platform

BPBorderView

A simple UIView subclass which takes some flags on initialization for easy set up of border subviews.

Installation

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

pod "BPBorderView"

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

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!

Author

Ben Palmer, benj.c.palmer@gmail.com

License

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

About

A pod for a UIView subclass with easy borders

Resources

License

Stars

Watchers

Forks

Packages

No packages published