Latest 3.2.1
Homepage https://github.com/pres/PREBorderView
License MIT
Platforms ios 6.0, requires ARC
Authors

A very simple Objective-C UIView category for specifying single-sided borders.

sample


Installation

Using CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like PREBorderView in your projects.

Podfile

pod 'PREBorderView', "~> 3.2"

Manual

Otherwise just include UIView+PREBorderView.{h,m} in your project.


Usage

Add a border to a view

[view addBorderWithColor:[UIColor blackColor] andWidth:2 atPosition:PREBorderPositionRight];

Remove a border

[view removeBorderAtPosition:PREBorderPositionRight];

defaultBorderColor

For convenience of usage you are able to specify a defaultBorderColor.

  • addRetinaPixelBorderWithColor:atPosition:
  • addRetinaPixelBorderAtPosition:

adds the border using defaultBorderColor

Respond to size changes

To easily update all borders to size changes of views

  • Use layoutBorders to update borders of a view.
  • Use layoutSubviewBorders to update borders of a view, as well as all borders of subviews.

To update a controller’s view to auto layout changes call layoutSubviewBorders in viewDidLayoutSubviews.

Full Documentation


Communication

  • If you found a bug, and can provide steps to reliably reproduce it, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

License

PREBorderView is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "PREBorderView",
    "version": "3.2.1",
    "summary": "A very simple Objective-C UIView category for specifying single-sided borders.",
    "homepage": "https://github.com/pres/PREBorderView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Paul Steinhilber": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pres/PREBorderView.git",
        "tag": "3.2.1"
    },
    "source_files": "UIView+PREBorderView.{h,m}",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This