Skip to content

brentnycum/BNBorderedView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Bordered UIView with support for Insets.

Resources

License

Stars

Watchers

Forks

Packages

No packages published