Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Bordered UIView with support for Insets.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
BNBorderedView.h
BNBorderedView.m
BNBorderedView.podspec
LICENSE
README.md

README.md

BNBorderedView

Bordered view with support for inset borders. BNBorderedView allows for the creation of custom size and color borders and insets on your UIView. Much in the same way you would be able to define borders on an div with CSS. With BNBorderedView you can define each border to have differing properties.

This was a class I used in a project a long time ago that I wanted to open source rather than sit around.

Screenshot

Installing

Copy BNBorderedView.h and BNBorderedView.m to your projects.

Cocoapods

pod 'BNBorderedView', :git => 'https://github.com/brentnycum/BNBorderedView.git'

Usage

Using BNBorderedView is simple. Simply initialize like any normal UIView.

BNBorderedView *borderedView = [[BNBorderedView alloc] initWithFrame:CGRect(10, 10, 60, 60)];

In BNBorderedView you can set everything via properties.

borderedView.topBorderColor = [UIColor blueColor];

Border Color

  • topBorderColor
  • bottomBorderColor
  • leftBorderColor
  • rightBorderColor

  • setBorderColor:(UIColor *)color To set all border colors.

Border Size

  • topBorderSize
  • bottomBorderSize
  • leftBorderSize
  • rightBorderSize

  • setBorderSize:(CGSize)size To set all border sizes.

Inset Color

  • topInsetColor
  • bottomInsetColor
  • leftInsetColor
  • rightInsetColor

  • setInsetColor:(UIColor *)color To set all inset colors.

Inset Size

  • topInsetSize
  • bottomInsetSize
  • leftInsetSize
  • rightInsetSize

  • setInsetSize:(CGSize)size To set all inset sizes.

Something went wrong with that request. Please try again.