KibbleLib
Bits and pieces (get it? Kibbles and bits? :D...sorry, I'm better than this) of extensions and utils that have been gathered over time to make future apps and projects more convenient.
Features
Pinview
let pinEntryView = PinEntryView()
pinEntryView.delegate = self
pinEntryView.length = 6
UnderlineTextField
let textField = UnderlineTextField()
textField.fieldDelegate = self
FormActionView
let actionView = FormActionView(title: "FormActionView", buttonColor: .blue, enabledbyDefault: true)
actionView.delegate = self
Convenience extension methods
UIView shake animation
let view = UIView()
view.Shake()
Add array of subviews & remove all subviews
view.AddSubviews(view1, view2, view3)
view.RemoveAllSubviews()
UIView Shake Animation
let view = UIView()
view.Shake()
Add gesture recognizers through handler closure, or by passing handler
view.AddSingleTapRecoWith(action: self.shakeView)
view.AddTapRecoWith(numberOfTaps: 2, action: self.shakeView)
view.AddLongPressRecoWith { [weak self] longPress -> Void in
if let sSelf = self {
sSelf.view.Shake()
}
}
String extension for LocalizedString syntax simplification
"sample_localized_string".Localized()
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
KibbleLib is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'KibbleLib'
Author
Ali H. Shah, email: [email protected], linkedin
License
KibbleLib is available under the MIT license. See the LICENSE file for more info.