Demo project that illustrates some of ObjC rarely used features.
- Unnamed methods
- Subscript methods for custom objects
@property
syntax for non-property methods- Creating object without
alloc
/init
(withcalloc
) - Print current autorelease pool
- Synthesized ivars for
@property
- Accessing public ivars with
->
instancetype
keyword- Proxying other object with
forwardingTargetForSelector:
andforwardInvocation:
- Using
NSFastEnumeration
to makefor..in
loop possible for custom objects
Project uses ARC and contains one custom class TestObject
with all mentioned features in it. main()
function show how this class can be used.
This code is distributed under MIT License. See LICENSE
file for more info.