Latest 1.0.0
License MIT
Platforms ios 6.0, requires ARC
Frameworks Foundation, UIKit

UIView extension of making UIView borders


pod 'LPViewBorderMaker', '~> 1.0.0'


//make borders for edges with default border width and color
- (void)makeBorders;

//make border for a edge which can be top/left/bottom/right with custom border width and color 
- (void)makeBordersWithWidth:(float)width color:(UIColor *)color position:(LPBorderPosition)position;
//for example: make view borders with params:`LPBorderPositionBottom|LPBorderPositionRight|LPBorderPositionLeft`
UIView *v = [[UIView alloc] initWithFrame:CGRectMake(150, 170, 100, 70)];
[v makeBordersWithWidth:0.5 color:[UIColor redColor] position:LPBorderPositionBottom|LPBorderPositionRight|LPBorderPositionLeft];

//make borders for some edges with an array, you can custom border width and color too (DEPRECATED)
// - (void)makeBordersWithWidth:(float)width color:(UIColor *)color positions:(NSArray *)positions;


<img src="screenshot.png", width=320>

Release Notes

  • 1.0.0

    modify function params type

  • 0.0.2

    view layer bugfix

  • 0.0.1

    first commit version

Latest podspec

    "name": "LPViewBorderMaker",
    "version": "1.0.0",
    "summary": "UIView extension of making UIView borders",
    "description": "UIView extension of making UIView borders via CAGradientLayer",
    "homepage": "",
    "license": {
        "type": "MIT"
    "authors": {
        "litt1e-p": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.0"
    "platforms": {
        "ios": "6.0"
    "requires_arc": true,
    "source_files": "LPViewBorderMaker/*",
    "frameworks": [

Pin It on Pinterest

Share This