Latest 1.0.0
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit




There are several ways to use CustomXibView

Setting Xib Name in Interface Builder

If you view is not complicated, you can just:

  • Place UIView in you Interface Builder
  • Set its class to CustomXibView in Identity Inspector
  • Set the name of your custom xib view in Attributes Inspector

Alt Text

Deriving from CustomXibView

To implement more complex behaviour:
Set its class to your class derived from CustomXibView in Identity Inspector
If class name is the same as xib name, there is no need to provide the xib name.
Otherwise you can set the xib name in Attributes Inspector or in your class by overriding xibName property.

import UIKit

class PartyParrot: CustomXibView {

class BTCView: CustomXibView {

    override var xibName: String {
        return "BTC"


Alt Text

Creating CustomXibView programmatically

You can create CustomXibView by calling its init(frame:).
Then it can be added as subview in code.



  • Drag the file CustomXibView.swift into your application’s Xcode project.


  • pod ‘CustomXibView’

Latest podspec

    "name": "CustomXibView",
    "version": "1.0.0",
    "summary": "A simple way to reuse views created in xibs.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Piotr Wiu0119caszek": "[email protected]"
    "platforms": {
        "ios": "9.0"
    "requires_arc": true,
    "source": {
        "git": "",
        "tag": "1.0.0",
        "submodules": true
    "source_files": "Sources/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This