NACommonUtils 2.7.0

NACommonUtils 2.7.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2019
SPMSupports SPM

Maintained by Nick Ager.



NACommonUtils

CI Status codecov.io Version License Platform

Swift utilities and extensions used across a number of iOS apps

Utility Comment
ActivityOverlay Light-weight version of MBProgessHUD - shows a translucent HUD, containing an activity indicator, centred in a specified view
Array+Functional func headTail() -> (head: Element, tail: [Element])?; arrayByAppend and arrayByAppendContentsOf non-mutating versions of the stdlib append and appendContentsOf
NSMutableAttributedString+Creation NSMutableAttributedString creation helpers
OnePixelConstraint Designed as a auto-layout width/height constraint that will always be 1px regardless of screen scale
String+LineUtils Strings line helpers
UIButton+ActionBlock Button onPressed: block extension
UIGestureRecognizer+ActionBlock Gesture recognizer block extension
UIResponder+FindUIViewController Walk the responder chain until we find a UIViewController; useful when a UIView needs to access UIViewController API
UIView+Autolayout Autolayout helpers; useAutolayout(), centerInView(..), constrainToWidth(..), constrainToHeight(..)
KeepInMemoryMixin Class mixin to allow the class to keep itself in memory
UIView+NibLoading instanceFromNib() Load an instance of a view from a nib named identically to the class.
UILabel+Measurement text size measurement

Installation

The utilities are available as a Cocoapod. To incorporate them to your project add the following to your Podfile eg:

target '<YourProject>' do
    pod 'NACommonUtils'
    .
    .
end

See nickager.com/blog/2016/03/04/NACommonUtils for further details.