Close the alert immediately
Set how long the alert is displayed
Duration in seconds (default: 5.0)
Self for chaining
Set the padding around the alert text
Padding in points (default: 20)
Self for chaining
Set a custom position for the alert When a position is set, the alert is shown at those coordinates and will not be stacked with other alerts. Coordinates are in points from the top-left of the visible screen area (below the menu bar), with y increasing downward.
Dictionary with x and y coordinates
Self for chaining
HSUIAlert
A temporary on-screen notification* Displays a message that automatically fades out after a specified duration. Without an explicit
.position(), multiple alerts stack vertically and stay centered as they appear and disappear. With.position(), the alert appears at the given coordinates regardless of other alerts.Example