| Start |
|---|
| Subscripts with NSArray Subscripts can be used to simplify retrieving and setting elements in an array. Given the following array This line Can be replaced by They can also be used to set an element in a mutable array. If the index of the subscript equals the count of the array, the element will be appended to the array. Repeated subscripts may be used to access elements of nested arrays. |
| Custom Subscripting You can add subscripting to your own classes by implementing the required methods. For indexed subscripting (like arrays): For keyed subscripting (like dictionaries): |
| Subscripts with NSDictionary Subscripts can also be used with NSDictionary and NSMutableDictionary. The following code: Can be shortened to: |
Read Article
https://develop.horje.com/learn/1434/reference