Skip to content

nzrsky/ModernObjC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ModernObjC

Build Status codecov.io CocoaPods Compatible Carthage compatible Platform Twitter

It adds lets, vars and typed copy/foreach functions for ObjC collections

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

	// Objective-C without types
	NSDictionary *notes = [document fetchNotes];
	printf("%d", [notes[@"default"] words]);

	// Before:
	NSDictionary<NSString*, NSArray<Note*>*> *notes = [document fetchNotes];
	printf("%d", notes[@"default"]);

	NSDictionary<NSString*, NSArray<Note*>*> *notes = [document fetchNotes];
	printf("%d", notes[@"default"]);

Requirements

Installation

ModernObjC is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ModernObjC'

Author

Alexey Nazarov, alexx.nazaroff@gmail.com

License

ModernObjC is available under the MIT license. See the LICENSE file for more info.