简体   繁体   English

如何获取UIAlertView消息的字体大小

[英]How to get font size of UIAlertView message

I am adding a accessoryView in UIAlertView. 我在UIAlertView中添加了一个附件视图。 accessoryView will have label with some text. AccessoriesView将带有带有一些文本的标签。 I want to give label same font as UIAlertView's message font. 我想给标签提供与UIAlertView的消息字体相同的字体。 how to get font style and font size of UIAlertView message 如何获取UIAlertView消息的字体样式和字体大小

在此处输入图片说明

So unfortunately it is impossible to change the textField font, buttons text color . 因此,很遗憾,无法更改textField字体,按钮文本颜色。 etc. Clearly mention in Apple's document. 等等。在Apple文档中明确提及。

UIAlertView_Class UIAlertView_Class

The only solution is 唯一的解决方案是

1) Use UIView as Custom alertview or 1)使用UIView作为自定义Alertview或

2) There are lots of customised alertview available on Github with awsome animation and etc. Like, - ios-custom-alertview 2)在Github上有很多自定义的alertview,带有可怕的动画等。例如, -ios-custom-alertview

and lots of just search on Google Alertview 以及在Google Alertview上进行的很多搜索

You must to create your custom Alert based on UIView. 您必须基于UIView创建自定义警报。

Apple provide UIAlertView "as-is" it doesn't support subclassing. Apple按原样提供UIAlertView ,它不支持子类化。

它们是预定义的系统字体12。我认为您无需更改任何内容即可获得该字体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM