Skip to content

liangdahong/Chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chain

CI Status Version License Platform

Example

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

Requirements

Installation

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

pod 'Chain'

例子

View

  • 代码
class ViewController: UIViewController {
    
    let myView = UIView()
        .cp
        .backgroundColor(.red)
        .frame(.init(x: 100, y: 100, width: 100, height: 100))
        .end
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        myView.layer.cp
            .cornerRadius(15)
        view.addSubview(myView)
    }
}
  • 效果

Author

[email protected].

License

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

About

Swift 链式调用

Resources

License

Stars

Watchers

Forks

Packages

No packages published