Utility functions for swift that have been created through the years. Some converted from other languages.
The utilities are broken down by type categories (I did what I thought was ok).
- Queues --> I mainly created these so as Swift morphs, I can easily adjust the function bodies and not all over the code base, plus, I may want to add later functionality.
- NumberToWords --> Convert decimal values to words for use in writing a check. Cause we all write checks these days....
- SendLocalAlert --> A simple way to send and stop local alerts
- Phone --> See if device is currently on a phone call
- FileSystem --> clear out temp files, determine available space on device
- CancelableClosure --> I use it for waiting for 0.5 seconds to elapse on key strokes, then call some lookup function
- UIColor Extension --> great way to save a color value as an Int then pull from database and easily convert back to UIColor
- Int Extension --> convert Int to String distance display in feet/miles, 123456 to 123,456, 123456 to 123.5k (thousands), 123456789 to 123.46m (million)
- AutoFillTextField --> if trigger char is matched while typing in textfield a popup selection list is displayed