blog.kulman.sk/changing-uialertaction-text-color

Preview meta tags from the blog.kulman.sk website.

Linked Hostnames

6

Thumbnail

Search Engine Appearance

Google

https://blog.kulman.sk/changing-uialertaction-text-color

Changing UIAlertAction text color

If you use the standard iOS UIAlertController to present the user with a list of actions, there is not much you can do about styling each of the UIAlertActions shown. The text of the shown UIAlertAction uses the UIView’s tint color, so you can use the UIAppearence API to change it to any color you want, but the same color for all the UIAlertActions. If you set the style to destructive instead of default, the text is shown as red, not affected by the tint color. UIAlertController with one default and one destructive action might then look like this with dark blue set as the global tint color using UIAppearence: The red color for the destructive option does not look that great, especially if your app uses a different shade of red everywhere else. If you dive deep into Apple documentation you will find a KVC called titleTextColor. This KVC allows you to set exactly what you need, the color for the UIAlertAction text.



Bing

Changing UIAlertAction text color

https://blog.kulman.sk/changing-uialertaction-text-color

If you use the standard iOS UIAlertController to present the user with a list of actions, there is not much you can do about styling each of the UIAlertActions shown. The text of the shown UIAlertAction uses the UIView’s tint color, so you can use the UIAppearence API to change it to any color you want, but the same color for all the UIAlertActions. If you set the style to destructive instead of default, the text is shown as red, not affected by the tint color. UIAlertController with one default and one destructive action might then look like this with dark blue set as the global tint color using UIAppearence: The red color for the destructive option does not look that great, especially if your app uses a different shade of red everywhere else. If you dive deep into Apple documentation you will find a KVC called titleTextColor. This KVC allows you to set exactly what you need, the color for the UIAlertAction text.



DuckDuckGo

https://blog.kulman.sk/changing-uialertaction-text-color

Changing UIAlertAction text color

If you use the standard iOS UIAlertController to present the user with a list of actions, there is not much you can do about styling each of the UIAlertActions shown. The text of the shown UIAlertAction uses the UIView’s tint color, so you can use the UIAppearence API to change it to any color you want, but the same color for all the UIAlertActions. If you set the style to destructive instead of default, the text is shown as red, not affected by the tint color. UIAlertController with one default and one destructive action might then look like this with dark blue set as the global tint color using UIAppearence: The red color for the destructive option does not look that great, especially if your app uses a different shade of red everywhere else. If you dive deep into Apple documentation you will find a KVC called titleTextColor. This KVC allows you to set exactly what you need, the color for the UIAlertAction text.

  • General Meta Tags

    11
    • title
      Changing UIAlertAction text color - Igor Kulman
    • charset
      utf-8
    • X-UA-Compatible
      IE=edge
    • viewport
      width=device-width, initial-scale=1, shrink-to-fit=no
    • theme-color
  • Open Graph Meta Tags

    5
    • og:title
      Changing UIAlertAction text color
    • og:description
      If you use the standard iOS UIAlertController to present the user with a list of actions, there is not much you can do about styling each of the UIAlertActions shown. The text of the shown UIAlertAction uses the UIView's tint color, so you can use the UIAppearence API to change it to any color you want, but the same color for all the `UIAlertAction`s. If you set the style to destructive instead of default, the text is shown as red, not affected by the tint color.
    • og:type
      article
    • og:url
      https://blog.kulman.sk/changing-uialertaction-text-color/
    • og:image
      https://blog.kulman.sk/changing-uialertaction-text-color/color.png
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:image
      https://blog.kulman.sk/changing-uialertaction-text-color/color.png
    • twitter:title
      Changing UIAlertAction text color
    • twitter:description
      If you use the standard iOS UIAlertController to present the user with a list of actions, there is not much you can do about styling each of the UIAlertActions shown. The text of the shown UIAlertAction uses the UIView's tint color, so you can use the UIAppearence API to change it to any color you want, but the same color for all the `UIAlertAction`s. If you set the style to destructive instead of default, the text is shown as red, not affected by the tint color.
  • Item Prop Meta Tags

    7
    • name
      Changing UIAlertAction text color
    • description
      If you use the standard iOS UIAlertController to present the user with a list of actions, there is not much you can do about styling each of the UIAlertActions shown. The text of the shown UIAlertAction uses the UIView's tint color, so you can use the UIAppearence API to change it to any color you want, but the same color for all the `UIAlertAction`s. If you set the style to destructive instead of default, the text is shown as red, not affected by the tint color.
    • datePublished
      2019-06-26T05:29:12+01:00
    • dateModified
      2019-06-26T05:29:12+01:00
    • wordCount
      222
  • Link Tags

    10
    • apple-touch-icon
      https://blog.kulman.sk/apple-touch-icon.png
    • canonical
      https://blog.kulman.sk/changing-uialertaction-text-color/
    • icon
      https://blog.kulman.sk/favicon.ico
    • preload
      https://blog.kulman.sk/theme.png
    • preload
      https://blog.kulman.sk/images/avatar.jpg

Links

21