Nori designs the view of the storyboard with source code.

Usage

Button

It’s same as the Label.

@IBDesignable class StarButton: StyleableButton {
    override func intrinsicStyle(for state: UIControlState) -> ButtonStyle {
        return ButtonStyle {
            $0.backgroundColor = Color.green.color
            $0.cornerRadius = 10
            $0.title = LabelStyle {
                $0.textColor = UIColor.white}}}}Copy the code

License

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