Here is an example function that creates an alert message with custom buttons and text in Swift:
main.swift399 chars12 lines
This function creates a UIAlertController with a title and message, and adds two custom buttons - "OK" and "Cancel". The user can tap either button to dismiss the alert. To use this function, simply call it from within a UIViewController subclass.
gistlibby LogSnag