4

So I want the users to be able to start a call from the app, fo this I'm using:

func prepareCall(to phoneNumber:String) {
    let callURL = URL(string:"telprompt://\(phoneNumber)")!
    UIApplication.shared.open(callURL, options: [:], completionHandler: nil)
  }

Everything works fine, is just a theme issue what I've got here. I've also set global tint like so:

    self.window?.tintColor = //my main theme color

So my whole app has a base tint color applied to all alerts, buttons, etc. But when the user is prompted with the alert confirmation button it has that blue default tint.

alert

Is there any why to change this alert tint?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Possible duplicate of [Swift How to change UIAlertController's Title Color](https://stackoverflow.com/questions/31662591/swift-how-to-change-uialertcontrollers-title-color) – Prashant Tukadiya Jul 23 '18 at 13:53
  • 1
    that's a completely different question @PrashantTukadiya – Sebastian Guerrero Jul 23 '18 at 14:19
  • 1
    This is a default behavior and provided by the system. It’s also localizable by default. I think it’s not changeable. Also you can simply use `tel://` – Mannopson Jul 23 '18 at 14:20
  • @SebitasSg Exactly! You’re right! – Mannopson Jul 23 '18 at 14:20
  • That's what I thought @Mannopson, just wasn't sure, thanks, FYI I'm using telprompt: for the user to be able to comeback to the app after the call. – Sebastian Guerrero Jul 23 '18 at 14:23
  • 1
    @SebitasSg Also make it as an optional feature ( Phone call ). Because the iPad or the iPod touch can’t open this `url` `( tel: )`. Therefore use the `canOpenURL` first. – Mannopson Jul 23 '18 at 14:49

1 Answers1

3

It is impossible , at least in iOS 11.4.1.

Example view:

00

the corresponding view hierarchy ,

111

the blue alert is not there.

the noisy blue alert is not within your app. It is of the system.

More evidence:

Xcode stop running, the blue alert is still there. The app project is terminated.

333

dengApro
  • 3,848
  • 2
  • 27
  • 41