Latest 0.2.1
Homepage https://github.com/Rogaven/UIView-Frame
License MIT
Platforms ios 5.0, requires ARC
Authors

UIView-ODFrame

Version
License
Platform

Category for UIView extends the frame accessibility

Usage

For example, instead of:

CGRect rect = view.frame;
rect.size.width += 100;
view.frame = rect;

you can use:

view.od_width+=100;

Methods

Position:

  • od_origin;
  • od_x;
  • od_y;
  • od_left;
  • od_top;
  • od_bottom;
  • od_right;

Size:

  • od_size;
  • od_height;
  • od_width;

Bounds:

  • od_boundsWidth;
  • od_boundsHeight;
  • od_boundsX;
  • od_boundsY;

Center:

  • od_centerX;
  • od_centerY;

Extra inline functions

Point and Frame values:

NSValue *ODRect(CGRect frame);
NSValue *ODPoint(CGPoint point);

Integral structs:

CGPoint CGPointIntegral(CGPoint point);
CGSize CGSizeIntegral(CGSize size);

Average between two values:

float avgf(float x1, float x2);
double avgd(double x1, double x2);

Installation

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

pod "UIView+ODFrame"

Author

Alexey Nazaroff, [email protected]

License

UIView-ODFrame is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UIView+ODFrame",
    "version": "0.2.1",
    "summary": "Category for UIView extends the frame accessibility.",
    "homepage": "https://github.com/Rogaven/UIView-Frame",
    "license": {
        "type": "MIT",
        "file": "LICENSE.txt"
    },
    "authors": {
        "Alexey Nazaroff": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Rogaven/UIView-Frame.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "src/**/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This