SkillAgentSearch skills...

UIKitz

A compact set of complementary additions to UIKit

Install / Use

/learn @SwiftKitz/UIKitz
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

UIKitz :shipit:

Version Travis CI Swift Platforms

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

  1. 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

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated1y ago
Forks1

Languages

Swift

Security Score

75/100

Audited on Nov 22, 2024

No findings