I am using UITextField.
I enter characters using the keyboard in UITextField.
When I tap the return button on the keyboard, I will display sentences in UILabel.
I would like to convert from UILabel to image after I display the characters in UILabel.
However, I do not know how to convert from UILabel to image.
Is there a better way?
@IBOutlet var messageLabel: UILabel!
@IBOutlet var messageField: UITextField!
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
messageLabel.text = messageField.text
//Here I would like to convert from UILabel to image.
//UILabel → image
}