Jump to:
SR66UIKeyboardManager
SR66UIDeviceUtilities
SR66UIButton
SR66UILabel
SR66UIImageView
SR66UIView
SR66NSLayoutConstraint
SR66UILayoutShorthands
SR66UIViewAutoCornerExtension
SR66UIViewLengthCalculationBasis
SR66UIViewUtilities
Demo Application for SR66UIKeyboardManager
Demo Application for SR66NSLayoutConstraint
Demo Application for SR66UILayoutShorthands
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.

The Package Collection by Category
Keyboard and Device Management
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:
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
Enhanced User Interface Components
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
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
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
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
Programmatic Auto Layout
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
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
View Extensions and Utilities
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
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
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
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

Demo Application for SR66NSLayoutConstraint
Download ready-to-run application for macOS

Demo Application for SR66UILayoutShorthands
Download ready-to-run application for macOS

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
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 |
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
skyRoute66 GitHub repositories to explore the collection.
Home Page
Top of Page