Today I released two new open source projects: a tiny one, DejalUtilities, and a significantly larger one, DejalFoundationCategories.
DejalFoundationCategories is a collection of Foundation-level categories, to add useful methods to classes like
NSString, and others. They work on both OS X and iOS, and include:
NSMutableArray, including object matching, reversal, sorting, deep copying, adding and removing.
NSMutableAttributedString, including convenience initializers, RTF and font methods.
NSDate, including convenience initializers, handy date component properties and calculators, JSON date support, string formatting, and relative date output.
NSMutableDictionary, including object matching, scalar support, deep copying, and more.
NSFileManager, including convenient file attributes, file renaming, and path building.
NSObjectbase class, including key-value conveniences, “equivalent” comparisons, and
NSMutableString, including scalar value formatting, contains evaluation, comparisons, substring and range utilities, reformatting, checksum and encoding utilities, internet utilities, file path methods, and appending and replacing methods.
NSUserDefaults, including support for default values, sanitizing values, time intervals, factory settings, and copying preferences.
DejalUtilities is a single header file with some useful
#define macros and static functions, also for both OS X and iOS:
DejalClassSelectorAvailable()macros, to help determine available APIs.
DejalMonthsFromInterval(), and similar macros, to convert seconds to and from other units.
DEJAL_COMPILE_DATE_TIMEmacros, to help with debug information.
DejalWeakSelfmacro to easily make a weak representation of self for use with blocks.
You can get the code and more information from the Dejal Open Source page.
(Looking for an iOS or Mac developer? I'm available for contract or full-time work. Learn more about me.)