Latest 1.1.0
License MIT
Platforms ios 10.0

Build Status
Badge w/ Version
GitHub license

Getting Started

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

pod "Swible"


Swible core protocol is Designable which requires to methods to be implemented.

public protocol Designable: class {
    func setup()
    func applyStyling()

Setup: Is the first point where you can design your view. Main focus here should be to do the setup of code which only happen once. Often times you add subviews and constrain them inside this method.

Apply Styling: Should be used to customize the appearance of your views, for example you would set the backgroundColor, font or aligment here. It is called after setup and can be called multiple times.

UIKit subclasses

Swible provides a couple of base classes for UIKit views. To create your own designable view, choose a subclass which fits your element and subclass from it. Here is an example for a custom UIView

  1. Create a new DesingableView (or any other Designable___) subclass like

    class CustomView: DesignableView {
    override func setup() {
        // Do any setup in here, e.g. creating constraints in code
    override func applyStyling() {
        // Do any styling in here, e.g. background color


2. Design your view and add `@IBInspectable` properties.
3. Sometimes Xcode/Interface Builder does not recognize `Designable` subclasses as `@IBDesignable`. **!Workaround!** Declare your custom class as `@IBDesignable` like:
``` swift
class CustomView: DesignableView {




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

alt text

Latest podspec

    "name": "Swible",
    "version": "1.1.0",
    "summary": "Swible - Designables made easy in Swift",
    "description": "Swible aims to provide a streamlined way to create custom views which are rendered on the storyboard",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "e-Sixt": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.1.0"
    "platforms": {
        "ios": "10.0"
    "source_files": "Swible/Classes/**/*"

Pin It on Pinterest

Share This