This package provides extensions and subclasses to commonly used UIKit
Classes, like UIColor
and UIViewController
.
Everything is written in Swift, documented and tested.
This package is restricted to the iOS platfrom.
In the following an overview of all subclasses/extended classes and their functionalities:
- Automaticly scales the label to its maximal needed size based on its content view.
- Perform an action in a view controller if the corresponding tab bar item is selected again.
- Generates a
nib
,nibName
andnibInstance
of a view. Mainly usefull forUITableViewCell
andUICollectionViewCell
.
- Generate a resuable identifier.
- Generate
storyboardName
andstoryboardIdentifier
. - Methods to instantiate a
UIViewController
with either astoryboard name
or astoryboard
object. - Methods to instantiate the initial view controller from either a
storyboard name
or astoryboard
object.
- Create and update a Badge.
- Set the background to a color, a gradient color, or a rounded image.
- Given a view determine the index path of the corresponding collection view cell.
- Blend colors together
- lighter color
- darker color
- adjust color
- generate image from color
- generate hexstring
- Enable adding actions to buttons the swity way.
- Generate the model identifier of the used device.
- Generate a gradient image.
- Get the current first responder.
- Given a view determine the index path of the corresponding table view cell.
- Add Swifty way of adding constrains.
- Add inspectable elements for interface builder:
- cornerRadius
- cornerIsCircle
- borderWidth
- borderColor
- shadowOffset
- shadowRadius
- shadowOpacity
- layerShadowColor
- Determine the top visible view controller.
- Create different types of
UIAlertController
with ease. - Manage back button behaviour in navigation bar.
- Wrapper to embed and unembed view controller into each other.
Just integrate the APLUIKitExtension via Xcode 11 (tutorial).
After importing APLUIKitExtension
all classes, extensions and documentation can be accessed the default way.
An example of using the method darker()
of the UIColor
extension:
import APLUIKitExtension
let redColor = UIColor.red
let darkerRedColor = redColor.darker()
An example of using the class 'AutoMaxLayoutWidthLabel':
import APLUIKitExtension
let label = AutoMaxLayoutWidthLabel(frame: .zero)
APLUIKitExtension is created by apploft on 02.04.2020. Copyright © 2019 apploft GmbH MIT License · http://choosealicense.com/licenses/mit/