Code Monkey home page Code Monkey logo

nibdesignable's Introduction

Build Status Carthage compatible Pod version GitHub license

Nib Designable

Installation

CocoaPods

Add pod 'NibDesignable' to your Podfile

Carthage

Add github "mbogh/NibDesignable" to your Cartfile.

Manual

Simply drop NibDesignable.swift into your project and it is ready to use.

Usage

  1. Create a new class that subclass' NibDesignable like
class CustomView: NibDesignable {

}
  1. Create a nib, place a UIView and change the File's Owner to CustomView

    Correct:

    File's Owner is set to your custom class

    Incorrect:

    View class is set to your custom class

  2. Design your view and add @IBInspectable properties.

  3. Sometimes Xcode/Interface Builder does not recognize NibDesignable as @IBDesignable. Workaround Declare your custom class as @IBDesignable like:

@IBDesignable
class CustomView: NibDesignable {

}

Thanks

Contact

Follow me on Twitter (@mbogh) and/or visit my blog Just a Beech

License

Nib Designable is released under an MIT license. See LICENSE for more information.

Release Notes

Version 3.0.0

  • Swift 3.0 support, thanks to @sstadelman and @esetnik

Version 2.3.0

  • UICollectionReusableView support added by @ikesyo

Version 2.2.0

  • UICollectionViewCell support added by @pyankoff

Version 2.1.0

  • UIControl support added by @illaz

Version 2.0.0

  • Swift 2.0 for everyone, thanks to @bjarkehs

Version 1.1.1

  • Fixed minor issue with UITableViewCell

Version 1.1.0

  • Added support for UITableViewCells, thanks to @duemunk

Version 1.0.4

  • Swift 1.2 support, thanks to @ikesyo

Version 1.0.3

  • Switched to Auto Layout in setupNib(). This fixes issues when views have size of {0,0} initially.

Version 1.0.2

  • CocoaPods support

Version 1.0.1

  • proxyView is passe.
  • nibName() returns class name per default.

Version 1.0.0

  • Initial release

nibdesignable's People

Contributors

mbogh avatar jachobsen avatar ikesyo avatar bhstrifork avatar esetnik avatar sstadelman avatar pyankoff avatar duemunk avatar tingraldi avatar farzadshbfn avatar gabrielhauber avatar buscarini avatar sgtsquiggs avatar naohta avatar illaz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.