UIKitz
A compact set of complementary additions to UIKit
Install / Use
/learn @SwiftKitz/UIKitzREADME
UIKitz :shipit:
A compact set of complementary additions to UIKit
Even though I shipped it with my app, I still need to invest the time to set this up, and finalize the API. Contributors welcome!
Highlights
-
Compact and Transparent:<br /> Each addition made to the framework is required to be small and as transparent about errors and issues as the underlying API.
-
Full Documentation:<br /> You can refer to the playground in the project or this read me for the available features.
-
Full Testing:<br /> Aiming for 100% test coverage for such scattered functionality is a no-brainer.
Features
UINibs
Instantiate Objects from XIBs<br /> using class name and safe casting
// XIB file named "CustomClass" must exist in the bundle
let object = Object.nibObject() // .Optional(CustomObject)
let object = Object.nibObject(bundle: customBundle) // .Optional(CustomObject)
let object = Object.nibObject(owner: someOwner) // .Optional(CustomObject)
Instantiate ViewControllers from Storyboards<br /> using class name and safe casting
let controller = ViewController.createFromStoryboard(storyboard)
// returns .Optional(ViewController)
UIView
Easily support custom views in your ViewController
class CustomView: UIView {}
class ViewController: UIViewController {
override func loadView() {
view = CustomView()
}
}
extension ViewController: CustomViewProvider {
typealias ViewType = CustomView
}
let customView = ViewController().customView
Convenient grouping for UIViewAutoresizing
let flexibleMargins: UIViewAutoresizing = .FlexibleMargins
let flexibleSize: UIViewAutoresizing = .FlexibleSize
Getting Started
- Submodule only for now ... Cocoapods, Carthage, and better instructions coming soon.
Motivation
When our team in my previous company exceeded 2 engineers, things quickly became hectic in terms of convention. In the spirit of fighting this problem, we strove to eliminate the cause of inconsistency altogether and build a very thin convenience layer that is intuitive and easy to pickup.
A good example would be eliminating the need for defining UIxxxCell identifiers all over the place, and stick with class name as the identifier (which covered 100% of our use cases).
Author
Mazyod (@Mazyod)
License
UIKitz is released under the MIT license. See LICENSE for details.
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
