Jump to:

Overview

The skyRoute66 UIKit Package Collection is a suite of 11 open-source Swift packages designed to simplify and accelerate user interface development with UIKit.

The collection provides reusable solutions for common UI development tasks, including:

  • Programmatic Auto Layout
  • Automatic corner rounding
  • Dynamic font scaling
  • On-screen keyboard management
  • Device orientation detection
  • View geometry calculations

By automating common UI development tasks, these libraries allow developers to focus on application functionality rather than repetitive implementation details.

Each library is available as an individual Swift package, allowing developers to incorporate only the components they need. Swift Package Manager (SPM) automatically resolves and manages package dependencies.

All packages are freely available under the MIT License.

Real-World Use Case: Bearathon

Bearathon, a mobile game developed by skyRoute66, uses some of the published skyRoute66 packages directly from GitHub via Swift Package Manager (SPM). It demonstrates how these libraries enable responsive user interfaces and layouts that adapt automatically to different device screen sizes and orientations.

Bearathon Screenshot 1 Bearathon Screenshot 2 Bearathon Screenshot 3

up arrow Top of Page

The Package Collection by Category

Keyboard and Device Management

SR66UIKeyboardManager


right arrow See it on GitHub

right arrow Demo Application

SR66UIKeyboardManager

Features:

  • Fully customizable
  • Automatically displays or dismisses the on-screen keyboard in response to configurable events, gestures, and device rotation
  • Supports custom gestures
  • Automatically adjusts scrollable views to keep active text fields and text views visible

Problems solved:

  • Manual implementation of keyboard dismissal logic
  • Lack of convenient keyboard dismissal mechanisms in certain interfaces
  • On-screen keyboard obscuring active text fields and text views

Demo Application:

right arrow SR66UIKeyboardManager Demo

up arrow Top of Page

SR66UIDeviceUtilities


right arrow See it on GitHub

SR66UIDeviceUtilities

Features:

  • Simplifies device orientation detection
  • Convenient methods to retrieve device dimensions
  • Facilitates device-specific interface adaptation

Problems solved:

  • Cumbersome device orientation detection
  • Verbose and hard-to-read code for retrieving device screen dimensions

up arrow Top of Page

Enhanced User Interface Components

SR66UIButton


right arrow See it on GitHub

SR66UIButton

Features:

  • Automatic corner rounding
  • Dynamic title font scaling
  • Customizable background colors, borders, and appearance for different button states

Problems solved:

  • Disproportionate corner rounding across different button sizes
  • Inconsistent title font sizing across different screen sizes
  • Additional code required to customize button appearance for different control states

up arrow Top of Page

SR66UILabel


right arrow See it on GitHub

SR66UILabel

Features:

  • Automatically scales font size based on the label's width, height, shorter edge, or longer edge
  • Automatically adjusts text size to accommodate layout changes and different screen sizes

Problem solved:

  • Fixed label font sizes resulting in disproportionately small or large text across different screen sizes

up arrow Top of Page

SR66UIImageView


right arrow See it on GitHub

SR66UIImageView

Features:

  • Automatic corner rounding
  • Customizable borders for normal and highlighted states
  • Configurable background color and opacity

Problems solved:

  • Disproportionate corner rounding across different image view sizes
  • Additional code required to customize borders and appearance for different states

up arrow Top of Page

SR66UIView


right arrow See it on GitHub

SR66UIView

Features:

  • Automatic corner rounding based on view dimensions or a constant radius
  • Dynamically recalculates corner radii in response to layout changes

Problems solved:

  • Disproportionate corner rounding across different view sizes
  • Manual recalculation of corner radii when view dimensions change

up arrow Top of Page

Programmatic Auto Layout

SR66NSLayoutConstraint


right arrow See it on GitHub

right arrow Demo Application

SR66NSLayoutConstraint

Features:

  • Simplifies programmatic Auto Layout with convenient initializers for creating layout constraints
  • Used by many UI components in this collection

Problems solved:

  • Verbose and repetitive code when creating layout constraints programmatically
  • Reduced code readability when defining complex layouts

up arrow Top of Page

SR66UILayoutShorthands


right arrow See it on GitHub

right arrow Demo Application

SR66UILayoutShorthands

Features:

  • A collection of Swift UIView extensions for UIKit that simplifies programmatic Auto Layout
  • Concise, intuitive shorthand methods for positioning, alignment, spacing, and sizing constraints

Problem solved:

  • Verbose and repetitive Auto Layout code for common positioning, alignment, spacing, and sizing operations

up arrow Top of Page

View Extensions and Utilities

SR66UIViewAutoCornerExtension


right arrow See it on GitHub

SR66UIViewAutoCornerExtension

Features:

  • Simplifies automatic corner rounding
  • Calculation based on a view's width, height, shorter edge, longer edge, or a constant radius
  • Automatically recalculates corner radii when view dimensions change
  • Used by many UI components in this collection

Problems solved:

  • Repetitive code for proportional corner rounding
  • Manual recalculation of corner radii when view dimensions change

up arrow Top of Page

SR66UIViewLengthCalculationBasis


right arrow See it on GitHub

SR66UIViewLengthCalculationBasis

Features:

  • A Swift enumeration that standardizes dimension-based calculations for UIKit views
  • Calculation basis includes width, height, shorter edge, longer edge, or a constant value
  • Used by many UI components in this collection

Problem solved:

  • Inconsistent definitions of dimension-based calculation options across related UI components

up arrow Top of Page

SR66UIViewUtilities


right arrow See it on GitHub

SR66UIViewUtilities

Features:

  • A lightweight collection of Swift UIView extensions for UIKit
  • Simplifies view dimension calculations, aspect comparisons, and content bounding size measurements

Problems solved:

  • Repetitive code for common view geometry calculations
  • Manual calculations for comparing view dimensions and determining content bounding sizes

up arrow Top of Page

Demonstration Applications

Three open-source demonstration applications accompany the collection, showcasing the capabilities of the libraries and providing practical examples of their use in UIKit applications.

Demo Application for SR66UIKeyboardManager


right arrow Get Xcode project on GitHub

right arrow SR66UIKeyboardManager

SR66UIKeyboardManagerDemo screenshot 1 SR66UIKeyboardManagerDemo screenshot 2 SR66UIKeyboardManagerDemo screenshot 3

up arrow Top of Page

Demo Application for SR66NSLayoutConstraint


right arrow Get Xcode project on GitHub

right arrow Download ready-to-run application for macOS

right arrow SR66NSLayoutConstraint

SR66NSLayoutConstraint Demo Portrait SR66NSLayoutConstraint Demo Landscape

Demo Application for SR66UILayoutShorthands


right arrow Get Xcode project on GitHub

right arrow Download ready-to-run application for macOS

right arrow SR66UILayoutShorthands

SR66UILayoutShorthands Demo Portrait SR66UILayoutShorthands Demo Landscape

Key Features and Benefits

  • Faster user interface development
  • Automatic, dimension-based font scaling and proportional corner rounding
  • Adaptive layouts for different screen sizes and orientations
  • Simplified programmatic Auto Layout
  • Automated keyboard management
  • Automatic dependency resolution through Swift Package Manager
  • Free and open-source distribution

up arrow Top of Page

Project Highlights

Metric Total
Open-source Swift packages 11
Demonstration applications 3
Public GitHub repositories 14
Real-world applications using or adopting the collection 2

up arrow Top of Page

Open Source and Licensing

All 11 Swift packages are released under the MIT License, permitting both personal and commercial use.

Developers are encouraged to explore the source code, consult the individual package documentation, and incorporate these libraries into their own applications.

Visit the right arrow skyRoute66 GitHub repositories to explore the collection.

up arrow Top of Page