I am adding a accessoryView in UIAlertView. accessoryView will have label with some text. I want to give label same font as UIAlertView's message font. how to get font style and font size of UIAlertView message
Asked
Active
Viewed 2,272 times
0
-
Check that: http://stackoverflow.com/questions/21635414/change-font-size-for-uialertview-in-ios7 – Guy Daher Feb 10 '16 at 08:32
-
is not possible bro, if you need anything like this go for custom alert – Anbu.Karthik Feb 10 '16 at 09:01
-
`UIAlertView` is deprecated in iOS8+... `UIAlertController` is that you need to use since. – holex Feb 10 '16 at 09:09
3 Answers
0
So unfortunately it is impossible to change the textField font, buttons text color . etc. Clearly mention in Apple's document.
The only solution is
1) Use UIView as Custom alertview or
2) There are lots of customised alertview available on Github with awsome animation and etc. Like, - ios-custom-alertview
and lots of just search on Google Alertview

Badal Shah
- 7,541
- 2
- 30
- 65
-
As holex writes in his comments to the question, `UIAlertView` is deprecated, and `UIAlertController` should be used instead. The latter allows for attributed strings in the alert title as well as message, so you can change font/colours in these as you wish, see e.g. [this thread](http://stackoverflow.com/questions/35141400/how-to-change-color-of-single-letters-or-one-word-in-line#comment58286120_35141400). – dfrib Feb 10 '16 at 11:05
0
You must to create your custom Alert based on UIView.
Apple provide UIAlertView "as-is" it doesn't support subclassing.

Andriy Savran
- 535
- 3
- 19
0
They are predefined system font 12. I think you need not to change anything to get that font.

Sucharu Hasija
- 1,096
- 11
- 23