Latest 0.0.4
Homepage https://github.com/gonghonglou/GHLFrameKit
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

The source code is simple, all getters are safe, but you only should pay attention to the order in which these setter: right, bottom, centerX, centerY, center.

Maybe you should set width before right, centerX or center, set height before bottom, centerY or center.

Usage

UIView *viewA = [UIView new];
viewA.size = CGSizeMake(100, 100);
viewA.center = self.view.center;
viewA.backgroundColor = [UIColor redColor];
[self.view addSubview:viewA];

UIView *viewB = [UIView new];
viewB.top = viewA.bottom + 50;
viewB.left = viewA.left;
viewB.width = 200;
viewB.height = 200;
viewB.backgroundColor = [UIColor purpleColor];
[self.view addSubview:viewB];

CALayer *layer = [CALayer new];
layer.size = CGSizeMake(100, 100);
layer.right = viewA.centerX;
layer.bottom = viewA.top - 50;
layer.backgroundColor = [UIColor blueColor].CGColor;
[self.view.layer addSublayer:layer];

Installation

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

pod 'GHLFrameKit'

Author

gonghonglou, [email protected]

License

GHLFrameKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "GHLFrameKit",
    "version": "0.0.4",
    "summary": "Simpler to set frame for UIView.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/gonghonglou/GHLFrameKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "gonghonglou": "[email protected]"
    },
    "source": {
        "git": "https://github.com/gonghonglou/GHLFrameKit.git",
        "tag": "0.0.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "GHLFrameKit/Classes/**/*"
}

Pin It on Pinterest

Share This