Search code examples
iosswiftuiactionsheet

Action Sheet space between title and message?


Currently trying to create an action sheet that contains some space between the title and the message.

Here's what my action sheet currently looks like:

enter image description here

Here is what I would like it to look like:

enter image description here

Disregard the random blue circle under in the "Stop Following" button in the second picture. I'm simply trying to achieve the space between the title and the message without having to create a custom Action Sheet. Is this achievable? And if so, how?


Solution

  • Add line break \n on the message should help:

    let alert = UIAlertController(title: "Stop Following", message: "\n\n\nYou'll stop receiving activity", preferredStyle: UIAlertControllerStyle.actionSheet)
    

    enter image description here