Latest 0.1.1
Homepage https://github.com/summertian4/FrameKit
License MIT
Platforms ios 8.0, requires ARC
Authors

FrameKit FrameKit FrameKit FrameKit FrameKit

FrameKit

Introduction

中文简介

A UIView frame tool that uses chain calls

Uncomfortable code:

self.view.frame.origin = CGPoint(x: 100.0, y: self.view.frame.origin.y)

In addition, different library extensions to the frame will lead to some naming conflicts.

If you use FrameKit, your frame settings will become::

self.view.lpd.x = 100.0

You can use it directly for your project, or as a dependent library for your personal library.

Install

pod 'FrameKit'

Example

let _ = self.view.fkit.x
self.view.fkit.x = 0.0

let _ = self.view.fkit.right
self.view.fkit.right = 300.0

let _ = self.view.fkit.bottom
self.view.fkit.bottom = 300.0

let _ = self.view.fkit.centerX
self.view.fkit.centerX = 100.0

All API

extension UIView {
    public var fkit: FrameKit.UIViewExtension { get }
}

get set 均可

public var y: CGFloat

public var width: CGFloat

public var height: CGFloat

public var size: CGSize

public var centerX: CGFloat

public var centerY: CGFloat

public var top: CGFloat

public var bottom: CGFloat

public var left: CGFloat

public var right: CGFloat

License

FrameKit 使用 MIT License

Feedback

If there are any suggestions, pleas send an email to [email protected], and also welcome to my blog to discuss. Learning together~

Latest podspec

{
    "name": "FrameKit",
    "version": "0.1.1",
    "summary": "A UIView frame tool that uses chain calls / u94feu5f0fu8c03u7528u7684 UIView frame u5de5u5177",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/summertian4/FrameKit",
    "source": {
        "git": "https://github.com/summertian4/FrameKit.git",
        "tag": "0.1.1"
    },
    "source_files": "FrameKit/**/*",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "authors": {
        "u5c0fu9c7cu5468u51ccu5b87": "[email protected]"
    },
    "social_media_url": "http://zhoulingyu.com",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This