iOSKickStart
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
About
A beautiful project template to kick start any iOS project. The target is to avoid recoding for features like UIView rounded rect designables or a simple scrolling form. Please contribute to this project to fill up with a standard set of features frequently needed.
Features & Implementations
1. Cross dissolve and reverse push pop navigation.
2. UIColor init with hex value.
3. UIView corner-radius and colored-border IBInspectables.
4. Text localization with key string from interface builder.
5. Define once use everywhere global constants.
6. NavigationController isNavBarHidden IBInspectable.
7. Scrollview actAsInputForm IBInspectable.
8. Dismiss keyboard on tap with enabling UIView extension var endEditingOnTap IBInspectable.
9. Default keyboard config enum in interfacebuilder to choose easily and avoid keyboard config mistakes.
10. UITextField left/right padding
OR
textField.leftPadding = 8.0
textField.rightPadding = 8.0
11. UIButton adoptive font size
OR
button.fontToHeightRatio = 0.35
button.numberOfLines = 1
button.adjustFontSize = true
12. Code input TextField
Demo:
Implementation:
OR
textField.codeLengthAndChar = "4,●"
AND
// MARK: - UITextFieldDelegate
func textFieldDidBeginEditing(_ textField: UITextField) {
if let textFld = (textField as? TextField), let _ = textFld.codeLength {
textFld.observeCodeInputDidBegin()
}
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if let textFld = (textField as? TextField), let _ = textFld.codeLength {
return textFld.observeCodeInput(shouldChangeCharactersIn: range, replacementString: string)
}
return true
}
13. UILabel bounds.height to font size ratio
OR
label.fontToHeightRatio = 0.6
14. UIViewController titleImage IBInspectable
OR
viewController.titleImage = UIImage(named: "image_name")
Limitations
- You have to extend or use sub classes declared here against Apple's base classes.
This is just a basic work. Please contribute, expand and Enjoy...
Installation
iOSKickStart is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "iOSKickStart"
Author
Twaha Mukammel, [email protected]
License
iOSKickStart is available under the MIT license. See the LICENSE file for more info.