The NSDictionary
class allows me to initialise it like this:
NSDictionary* attributes =
@{
NSFontAttributeName: font
};
What is this construction method called, and how I can implement it in my own class? I want to have a class with properties that have default values, and I'd like to only set the ones I need during construction (in C++ I would have done this with default parameter values, but Objective-C does not have that), so this seemed like a legitimate approach. Or is this something NSDictionary
specific?