Add pod 'NibDesignable' to your Podfile
Add github "mbogh/NibDesignable" to your Cartfile.
Simply drop NibDesignable.swift into your project and it is ready to use.
- Create a new class that subclass'
NibDesignablelike
class CustomView: NibDesignable {
}-
Create a nib, place a
UIViewand change theFile's OwnertoCustomViewCorrect:
Incorrect:
-
Design your view and add
@IBInspectableproperties. -
Sometimes Xcode/Interface Builder does not recognize
NibDesignableas@IBDesignable. Workaround Declare your custom class as@IBDesignablelike:
@IBDesignable
class CustomView: NibDesignable {
}- Donkey.jpg - cobalt123 - Baby Burro in Oatman, Arizona licensed under CC BY-NC-SA 2.0
- klngarthur
Follow me on Twitter (@mbogh) and/or visit my blog Just a Beech
Nib Designable is released under an MIT license. See LICENSE for more information.
Version 3.0.0
- Swift 3.0 support, thanks to @sstadelman and @esetnik
Version 2.3.0
UICollectionReusableViewsupport added by @ikesyo
Version 2.2.0
UICollectionViewCellsupport added by @pyankoff
Version 2.1.0
UIControlsupport 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

