Swiftpack.co - Package - NormanBitSolace/BlackLabs

BlackLabs

A Swift Package containing Foundation, UIKit, and original type helpers and extensions.


  • Bundle - convenience helpers and extensions to access local files and common plist entries like app name and version.
  • CGContext - convenience methods to draw lines and text in a CGContext.
  • CGGeometry - convenience helpers for CGSize and CGRect and arrays containing those types.
  • CloudKit - convenience helpers and extensions for Apple's CloudKit API.
  • Collection- convenience helpers and extensions for Collection.
  • Color - convert CSS color names and RGB hex values to UIColor. UIColor from hex 3, 4, 6, and 8 characters in length with or without # prefix. UIColor to hex. UIColor extension that creates immutable UIColor instances from hexadecimal and CSS color name strings (e.g. ff0, #f00, ff0000, ff0000ff, Pink, aZure, CLEAR, nil).
  • CommonColors - defines commonly used colors e.g. appWhite, appBlack, iOS7Blue, veryLightGray, evenColor, and oddColor.
  • Data - convenience helpers and extensions for Data handling, in particular when using REST.
  • Date - convenience helpers and extensions for working with Dates.
  • DeviceModels - a list of Apple device models (e.g. iPhone1,1). This list is generated from the a well maintained gist by Adam A Wolf.
  • Encodable - convenience methods to encode a Encodable object and view it as a JSON string.
  • File - Utilities for handling iOS document and app support as well as general encoding, decoding, data, etc. helpers.
  • Grid - a generic class to handle 2D Arrays.
  • Holiday - convenience helpers and extensions for determine non fixed Holidays (e.g. 3rd Monday of February) based on Date and Calendar.
  • NetworkError - enum of network errors. Results require an Error though in practice I don't bubble up these errors to the UI so this class is little used.
  • Notifications - prior to iOS 9 it was useful to use a token to ensure NotificationCenter.removeObserver was called, this class helps with that.
  • Number - convenience helpers and extensions for Int, CGFloat, and Double types e.g. formatting, conversion, and iterating.
  • Object - computed vars to access class name.
  • Queue - A generic queue struct (thanks Ray Wenderlich algorithms).
  • RestHelper - a protocol and extensions to generalize REST CRUD. This protocol allows an app to use dependency injection of it's data services so testing can use different implementations.
  • RestPath - utilities for creating REST URL paths.
  • RestService - A simple way to create a REST data service to handle failable CRUD operations (optionally in parallel).
  • Result - Extension to decode a Results Data when successful with let pet: Pet = result.decode().
  • Stack - A generic stack struct (thanks Ray Wenderlich algorithms).
  • String - String extensions e.g. contains(). Support for comma separated values.
  • UIDevice - defines Screensize struct, ScreenType enum. Extends UIDevice with modelName, isPad, isPhone, isSimulator, screenType, size, and landscapeSize properties.
  • UIView - convenience helpers and extensions for UIView.
  • UIViewController - convenience helpers and extensions for UIViewController.
  • UndoHistory - a very simple way to implement undo in an app.
  • URL - URLs are extended to GET, POST, PUT, and DELETE. Helpers for getting Codable, UIImage, and Data in serial or parallel.
  • URLRequest & URLResponse - Get method, url, status code, and header info.
  • URLSession - allows logging of information about network requests and responses.
  • UserDefaults - utilities for using UserDefaults e.g. setting and getting Codable objects.

Github

link
Stars: 0

Dependencies

Used By

Total: 0

Releases

Added open to URL for opening a url string in the mobile browser. - 2020-02-24 02:49:51

Added keyValue computed var to String. - 2020-02-20 22:15:58

CodeTimer is now an open class. - 2020-02-20 19:49:28

Added CodeTimer struct. - 2020-02-20 19:46:36

API changes. - 2020-02-19 20:50:05

API changes. - 2020-02-19 20:15:15

Extended Sequence with removeEmptyLines method. - 2020-02-19 18:59:21

Made method public. - 2020-02-19 16:17:16

Added convertToDictionary() to Collection. - 2020-02-19 16:14:35

Added readme and WIKI. - 2020-02-17 20:00:11

Made UndoHistory init public. - 2020-02-16 23:14:38

Public/Open access modifications. - 2020-02-16 23:09:25

- 2020-02-16 23:06:34

Updated CKRecord to public access. - 2020-02-16 22:46:40

Made Grid properties public. - 2020-02-16 22:43:41

Grid is open so it can be overridden in other modules. - 2020-02-16 22:36:56

Added UIView and UIViewController. - 2020-02-16 20:44:52

- 2020-02-16 20:31:25