Latest 0.1.0
Homepage https://github.com/renansep/RCView
License MIT
Platforms ios 6.0, requires ARC
Authors

CI Status
Version
License
Platform

Overview

Do you want to easily create UIView subclasses and initialize them via code, storyboards or XIBs?

Do you want to separate your logic into small components when you have THAT complex ViewController?

Do you want to reuse your component anywhere without caring about how to initialize it?

Do you want all of these things even working with Auto Layout?

RCView does it for you!

Usage

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

Now all you need to do is to create a subclass of RCView and a XIB file for your view.

Usage via Interface Builder (IB)

Drag a View from the Object Library to you XIB / storyboard and assign your subclass in the View’s Class property.

Usage via code

If you’re not using autolayout and want to set a frame to your view:

[[MyViewSubclass alloc] initWithFrame:frame];

If you’re using Auto Layout in your View’s superview you can simply call:

[[MyViewSubclass alloc] init];

And add the appropriate constraints later.

If you want to provide custom initializers for your view remember to call super initializers in their implementations.

Requirements

Your view’s XIB file must have the same name of your view subclass.

If you need to create outlets, once in your XIB, assign the subclass to the File’s Owner Class property (do not assign your subclass to the View’s Class property).

RCView

RCView

Installation

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

pod "RCView"

Author

Renan Cargnin (renansep), [email protected]

License

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

Latest podspec

{
    "name": "RCView",
    "version": "0.1.0",
    "summary": "RCView is a simple reusable UIView.",
    "description": "Do you want to easily create UIView subclasses and initialize them via code, storyboards or XIBs?nDo you want to separate your logic into small components when you have THAT complex ViewController?nDo you want to reuse your component anywhere without caring about how to initialize it?nDo you want all of these things even working with Auto Layout?nRCView does it for you!",
    "homepage": "https://github.com/renansep/RCView",
    "license": "MIT",
    "authors": {
        "Renan Cargnin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/renansep/RCView.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "RCView": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This