add(_:)
Creates a new object and sets it as the receiver’s content object.
Declaration
@IBAction func add(_ sender: Any?)Parameters
- sender:
Typically the object that invoked this method.
Discussion
Creates a new object of the appropriate entity (specified by entityName) or class (specified by objectClass)—see newObject()—and sets it as the receiver’s content object using addObject(_:).
Special Considerations
Beginning with OS X v10.4 the result of this method is deferred until the next iteration of the runloop so that the error presentation mechanism can provide feedback as a sheet.