Alert with custom Font

Customizing the Alert Title & Body
this extension is made by the admin at www.swiftdevcenter.com but needed to make some adjustments to make it work on xcode12/swift5
how to use it
Note “BahijTheSansArabic-Plain” is my custom font
Customizing the UIAlertAction Font
this one was complicated and after a lot of research i found this on solution from a gay on StackOverflow named Farhad Faramarzi.
the thing about the actions that they get generated in run time before that they simply don’t exist so you cant change what is not there, aaaaand that is why this solution targets the alertActions after they get generated in the viewDidLayoutSubviews() method, as so
in this one you just need to change the Font in the extension it self
A BIG note the font on the buttons will not change if you are running the app form the Xcode, instead you need to run the app from the xcode then stop it then go back and open it manually.
unless you have an iPhone 5s it will just work because of Magic 🧙🏻♂️
i hope you find this helpfull and big shoutout to Farhad Faramarzi. and www.swiftdevcenter.com