dictionaryWithDictionary
dictionaryWithDictionary is a class method of NSDictionary that creates and returns a new dictionary containing the entries of a given dictionary. The resulting dictionary is immutable and holds the same key-value pairs as the input. The method performs a shallow copy: the keys and values themselves are not copied, only the dictionary structure, and the objects referenced by those keys and values are reused.
The method signature is + (NSDictionary *)dictionaryWithDictionary:(NSDictionary *)dictionary;. It serves as a convenience constructor, equivalent to alloc/initWithDictionary:,
If the input dictionary is mutable, the new dictionary remains immutable. Passing nil to the method will
Common usage includes producing an immutable copy from a mutable dictionary or cloning an existing dictionary
Alternative initializers include -initWithDictionary:, and other copy operations such as -copy or -mutableCopy, depending on whether
---