Skip to content

mcubedsw/M3Foundation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M3Foundation 1.0.1

M3Foundation is a collection of categories and classes that extend and enhance the Foundation framework. This functionality is taken from various M Cubed applications.

M3Foundation includes the following:

  • Safer access/editing of arrays and dictionaries
  • performBlock:withDelay: methods
  • Replace the implementation of a method on a single object
  • Bulk KVO operations
  • Simplified XML access
  • Conversion of predicates and expressions to and from XML representation
  • Value transformers for file sizes and CSV strings
  • A NSOperation subclass for URL connections

And more

M3Foundation is currently Mac-only. An iOS version is in the works for M3Foundation 1.1.

M3Foundation requires Lion and Xcode 4.4+


Change Log

1.0.1

  • Moved some headers from Protected to Public

1.0

  • Removed M3Accessibility classes
  • Removed the M3DFA class
  • Removed the NSFileManager category
  • Removed the NSMutableSet category
  • No longer supports Garbage Collection, instead uses ARC
  • Improved tests
  • Updated to modern Obj-C syntax
  • Fixed the naming of some methods
  • Modified some methods to make more logical and practical sense
  • Added category for working with NSCountedSet
  • Added NSDictionary category to add equivalent to -[NSArray arrayByAddingObject:]
  • Added subscripting to NSMapTable

API changes

M3AccessibilityController (removed)


M3AccessibleUIElement (removed)


NSArray+M3Extensions

Changed
Old: - (id)m3_objectPassingTest:(BOOL (^)(id))
New: - (id)m3_firstObjectPassingTest:(BOOL (^)(id))


NSCountedSet+M3Extensions (added)

Added
- (NSSet *)m3_objectsWithCount:(NSUInteger) @property (readonly) NSUInteger m3_countedObjectTotal


M3DFA (removed)


NSDictionary+M3Extensions (added)

Added
- (NSDictionary *)m3_dictionaryBySettingObject:(id) forKey:(id <NSCopying>)


NSExpression+M3Extensions

Changed
Old: + (NSExpression *)m3_expressionFromXMLElement:(NSXMLElement *)
New: + (NSExpression *)m3_expressionWithXMLElement:(NSXMLElement *)


NSFileManager+M3Extensions (removed)


NSKeyValueObserving+M3Extensions (added) Added
- (void)m3_addObserver:(NSObject *) forKeyPathsInArray:(NSArray *) options:(NSKeyValueObservingOptions) context:(void *) - (void)m3_removeObserver:(NSObject *) forKeyPathsInArray:(NSArray *) - (void)m3_willChangeValueForKeys:(NSArray *) - (void)m3_didChangeValueForKeys:(NSArray *)


NSMapTable+M3Extensions (added)

Added
- (id)objectForKeyedSubscript:(id) - (void)setObject:(id) forKeyedSubscript:(id)


NSMutableArray+M3Extensions

Changed
Old: - (void)m3_moveObject:(id) toIndex:(NSUInteger)
New: - (void)m3_moveObjectAtIndex:(NSUInteger) toIndex:(NSUInteger)


NSMutableSet+M3Extensions (removed)


NSObject+M3Extensions

Changed
Old: - (id)m3_replaceImplementationOfMethodWithSelector:(SEL) with:(void *)
New: - (id)m3_replaceImplementationOfMethodWithSelector:(SEL) withBlock:(id)

Removed
- (void)m3_addObserver:(NSObject *) forKeyPathsInArray:(NSArray *) options:(NSKeyValueObservingOptions) context:(void *) - (void)m3_removeObserver:(NSObject *) forKeyPathsInArray:(NSArray *) - (void)m3_willChangeValueForKeys:(NSArray *) - (void)m3_didChangeValueForKeys:(NSArray *)


NSPredicate+M3Extensions

Changed
Old: + (NSPredicate *)m3_predicateFromXMLElement:(NSXMLElement *)
New: + (NSPredicate *)m3_predicateWithXMLElement:(NSXMLElement *)


NSXMLNode+M3Extensions

Removed
- (NSXMLNode *)m3_nodeForXPath:(NSString *) error:(NSError **)