How to hide title/message frame in a UIAlertController?

后端 未结 5 663
粉色の甜心
粉色の甜心 2020-12-24 05:02

When using a UIAlertController, if I want to present a UIActionSheet with an empty title and an empty message, the frame for the expected placement

5条回答
  •  没有蜡笔的小新
    2020-12-24 05:26

    Update Swift 4:

    let alert = UIAlertController(title: nil, message: nil, preferredStyle: UIAlertControllerStyle.actionSheet)
    

    Just need to pass nil to title and message params.

提交回复
热议问题