你好我想知道是否可以改变uialertview的文本格式。也就是
消息你赢了,但用赢字粗体显示。
看来,唯一的解决办法是为我创建自己的弹出窗口。
有什么想法?
谢谢
解决方案目前这是不可能的。你必须创建一个自定义 UIAlertView 。
从类参考:
$ b $这是唯一的选择,因为它不是子类。 b子类化注释 UIAlertView类的使用原样是,不支持子类化。这个类的视图层次是 private,不能被修改。
虽然有开源的版本。有一个自定义UIAlertView搜索,你会很容易找到它们。例如,看到这个问题的一些链接:
自定义UIAlertView?
Hi I was wondering if it is possible to change the text formatting of the uialertview. i.e
The message "You have won" but with the "won" word in bold.
I looked around and it seems that the only solution is for me to create my own popup.
any ideas?
Thanks
解决方案This isn't possible at present. You'd have to create a custom UIAlertView. That's the only option as it is not to be subclassed.
From the Class Reference:
Subclassing Notes The UIAlertView class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.
There are open source versions out there though. Have a search on "Custom UIAlertView" and you'll easy find them. For example see this question for some links:
Custom UIAlertView?
更多推荐
UIAlertView文本格式
发布评论