UINavigationItem.prompt does not adopt UINavigationBar.titleTextAttributes

Hi,


I have the code below:


import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        navigationController?.navigationBar.titleTextAttributes =
            [NSAttributedStringKey.foregroundColor: UIColor.red,
             NSAttributedStringKey.font: UIFont.systemFont(ofSize: 20)
        ]
  
        navigationItem.title = "My Title"
        navigationItem.prompt = "My Prompt"
    }
}


Running it on iOS 10.3.1 and iOS 9.3 results in the prompt to have red as a foreground color and the font SFUIDisplay 15.0 (which is 25% smaller than the size set for the title).


Running this on iOS 11 b7 (15A5362a) (or on simulator with with XCode 9.0 beta 6 (9M214v)), the prompt text color is black and the font is .SFUIText 13.00pt (which are the default foreground color/font for the prompt).


Would expect it to behave the same as iOS 10.3.1/9.3.


Couldn't find anything about it on the forums or on the net to indicate whether this is a bug or the new behaviour.

Replies

rdar://34009213

Have you found any workaround?