UIActionSheet 标题多行 [英] UIActionSheet Title Multiline

查看:33
本文介绍了UIActionSheet 标题多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很简单,我希望 UI 操作表的标题为两行.

Very simply I'd like to have the title of the UI Action Sheet be two lines.

请参见下面的示例.我想成功:

See example below. I'd like to make it:

(line1) 动作

(line2) 表格演示

(line2) Sheet Demo

仍然居中,一切都只是一个回车

Still centered and everything just with a carriage return

推荐答案

所以因为它需要 NSString * 你需要使用 \r

so because it takes NSString * you need to use \r

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"First Line\rSecond Line", nil)
                                                         delegate:self
                                                cancelButtonTitle:NSLocalizedString(@"_CANCEL", nil)
                                           destructiveButtonTitle:nil
                                                otherButtonTitles:NSLocalizedString(@"_USE_SYSTEM_LANGUAGE", nil), NSLocalizedString(@"_ENGLISH", nil), NSLocalizedString(@"_ARABIC", nil), nil];

它是复制和粘贴我使用 NSLocalizedString 但你 ncat 使用 NSString

it is copy&paste I use NSLocalizedString but you ncat use NSString

这篇关于UIActionSheet 标题多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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