Latest 0.0.3
Homepage https://github.com/chaseholland/UINibView
License MIT
Platforms ios 7.0, requires ARC
Authors

[![CI Status](http://img.shields.io/travis/Chase Holland/NibView.svg?style=flat)](https://travis-ci.org/Chase Holland/NibView)
Version
License
Platform

Usage

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

Requirements

Installation

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

pod "NibView"

About

This is a super simple pod for those times when you want to create a UIView from a nib (.xib), but you’re tired of typing
all the extra code to do the automatic loading when you add your custom nib-based view to another view or view controller.

I chose to hijack the "UI" name prefix because there isn’t anything called UINibView, and I don’t expect a similar class
from Apple in the future. If it does become a thing, you don’t need this pod anymore! Also, "UINibView" was what I expected
it to be named when I used it, so I went with it.

Usage

All you need to do (after installing the pod) is

  1. Create a subclass of UINibView
  2. Create a Resource->"View" from Apple’s new file templates and name it the exact same thing as your subclass

ie. If your subclass is called MyView, your nib would be named MyView, too. So you’d have MyView.h, MyView.m, and MyView.xib.

  1. Set the class type in the xib file to your view’s name (ie MyView).
  2. Drag a UIView from the templates into the view you want your custom view in.
  3. Set the class type of the view in the storyboard / other nib for your custom class
  4. Build / Run
  5. ???
  6. Profit

See the example file for more details, or feel free to open an issue or send me an email for further clarifications!

Author

Chase Holland, [email protected]

License

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

Latest podspec

{
    "name": "NibView",
    "version": "0.0.3",
    "summary": "Super simple, subclassable UIView that automatically loads itself from a nib when placed into Interface Builder (like a Storyboard).",
    "description": "  This is a super simple pod for those times when you want to create a UIView from a nib (.xib), but you're tired of typing all the extra code to do the automatic loading when you add your custom nib-based view to another view or view controller.n",
    "homepage": "https://github.com/chaseholland/UINibView",
    "license": "MIT",
    "authors": {
        "Chase Holland": "[email protected]"
    },
    "source": {
        "git": "https://github.com/chaseholland/UINibView.git",
        "tag": "0.0.3"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "NibView": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This