Invariant
Add an Invariant callout to the description of a symbol using the Invariant delimiter. Multiple Invariant callouts appear in the description section in the same order as they do in the markup.
Use the callout to display a condition that is guaranteed to be true during the execution of the documented symbol.
Works with:
Playgrounds
✓ Symbol documentation
Syntax
* | + | - Invariant: descriptionoptional continuation of description
The description displayed in Quick Help for the invariant callout is created as described in Parameters Section.
Example
/**An example of using the invariant field- Invariant:The person reference will not change during the execution of this method*/
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-06-05
