let action=UIAlertController(title: "OK", message: .default) {(_)in
When I write, I get the error Type 'String?' has no member 'default'
Why do I get this error?How can I fix the error?
Supplement the reason for the error.
The message for the argument is a value of type String?
https://developer.apple.com/documentation/uikit/uialertcontroller/1620106-message
Therefore, the compiler interprets String as omitted as follows:
UIAlertController (title: "OK", message: String.default)
However, there is no property (member variable) named default in the String type, so
The error String? type does not have the default member variable.
type 'String?' has no member 'default'
573 Understanding How to Configure Google API Key
610 Uncaught (inpromise) Error on Electron: An object could not be cloned
577 PHP ssh2_scp_send fails to send files as intended
891 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
568 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.