Overview:
- I am copying an instance of
UILocalNotificationand making changes to it to the newly created instance - Then I schedule the newly created instance of
UILocalNotification
How I am copying
- I am copying the instance of
UILocalNotificationby invoking the methodcopy
Question
- Am I doing the correct thing or should I be using a different method to create a mutable copy. (
mutableCopyis not implemented forUILocalNotification - Does copy actually do a mutable copy ?
- Is it necessary to create a copy at all, will
scheduleLocalNotification:create a new copy anyway ?
copy‘s fine.mutableCopygenerally applies to types which distinguish immutable and mutable flavors. since the type does not make that distinction,copyis ‘mutable’.scheduleLocalNotification:creates a copy of the parameter. explicitly copying is not strictly necessary.