An easy Xib loader:
You can use CocoaPods to install SwiftXib
by adding it to your Podfile
:
platform :ios, '8.0'
pod 'SwiftXib'
SwiftXib
is carthage
compatible. Add the following entry in your Cartfile
:
github "kuyu12/SwiftXib"
Then run carthage update
.
In your application, simply import the library
import SwiftXib
- UIView xib
- UITableView xib
- Create your Xib view.
- Create you Xib class and extend SwiftXibView class.
- Override nibName and set you xib view name.
- Connect Xib File's Owner to your class.
This example will simply load xib view with SwiftXibView
Class MyCustomView : SwiftXibView {
// override nibName and return your nib name. ('nibName.xib)
override var nibName: String {return "nibName"}
// setUI is call immediately after the view setUp.
override func setUI() {
// initialized your view
}
}
Distributed under the MIT license. See LICENSE
for more information.