ios - 标题和消息之间的操作表空间?

标签 ios swift uiactionsheet

目前正在尝试创建一个在标题和消息之间包含一些空格的操作表。

这是我的操作表目前的样子:

enter image description here

我希望它看起来像这样:

enter image description here

忽略第二张图片中“停止关注”按钮下方的随机蓝色圆圈。我只是想在不创建自定义操作表的情况下实现标题和消息之间的空间。这是可以实现的吗?如果是这样,怎么做到的?

最佳答案

在消息中添加换行符 \n 应该有帮助:

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

enter image description here

关于ios - 标题和消息之间的操作表空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39950581/

相关文章:

ios - 如何查看外围设备的 BLE 服务?

ios - iPhone应用程序中的黑色圆角矩形叫什么

IOS6.0, SupportedInterfaceOrientations in Navigation base application

ios - 单点触控 : ResignFirstResponder() issues

ios - SwiftUI 应用程序崩溃并出现 "attempt to insert row 2 into section 0, but there are only 2 rows in section 0 after the update"错误

ios - Mapbox iOS - 显示多个标注

ipad - UIActionSheet在iPad上再次出现后崩溃

ios - 来自带有 iOS8 GM 的 Popover 的 UIActionSheet

iphone - Apple 推送通知、注销应用程序和删除应用程序问题/解决方案

c# - 从 iOS TabBar 移除着色