如何隐藏UIAlertController中的标题/消息帧? [英] How to hide title/message frame in a UIAlertController?

查看:114
本文介绍了如何隐藏UIAlertController中的标题/消息帧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 UIAlertController 时,如果我想呈现带有空标题和空消息的 UIActionSheet ,标题和/或消息的预期放置框架仍然存在。

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 of the title and/or message remains.

如何更改此设置以便我只显示 ActionSheet




设置


退出


取消

How do I change this so that I only present an ActionSheet that reads:

Settings
Sign out
Cancel ?

谢谢!

推荐答案

当我使用此代码创建UIAlertController时我没有标题间距。

When I create a UIAlertController with this code I don't have the title spacing.

[UIAlertController alertControllerWithTitle:nil
                                    message:nil
                             preferredStyle:UIAlertControllerStyleActionSheet];

你是否为标题和消息或空字符串传递nil?

Are you passing in nil for the title and message or empty strings?

这篇关于如何隐藏UIAlertController中的标题/消息帧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆