how to make separate shadow appearance for UINavigationBar in Xcode 13

recently, I updated my Xcode 13 and my navigationBar broke like this:

it's same code and same Xcode but in iOS 15 simulator, scrollEdgeAppeance's shadow override standard one. it should be like this(same code in iOS 14 simulator).

here's my code (I turned shadow image to solid image to see clearly):

class MyViewController: UINavigationViewController {
	override func viewDidLoad() {
		super.viewDidLoad()

		let standard = UINavigationBarAppearance()
		standard.configureWithOpaqueBackground()
		standard.backgroundColor = .systemBlue
		standard.shadowImage = UIImage(color: .black)
		standard.shadowColor = .clear
		navigationBar.standardAppearance = standard
		
		let scroll = UINavigationBarAppearance()
		scroll.configureWithOpaqueBackground()
		scroll.backgroundColor = .systemRed
		scroll.shadowImage = UIImage()
		scroll.shadowColor = .clear
		navigationBar.scrollEdgeAppearance = scroll
	}
}	

it changes background color when scroll(large title ↔ standard title) but shadow image is not working.

how can I do?

what I want to do:

  1. I use solid image in example however I want to use alpha gradated shadow image. (not a template line shadow. it's important.)
  2. in large title appearance(scrollEdgeAppearance I think), shadow should not be appear.
  3. in standard title appearance(standardAppearance I think), shadow should be appear.

This seems likely to just be a bug on our part, and you should file a feedback report about it.

I'm not sure but scrollEdgeAppearance should work when scrollable view located below bottom of nav bar. It's not depend from scrolling of the view. Its shouldnt change in that way(you want) when we scroll view.

Is there any update on this? If not, any workaround?

Has a feedback report been created ?

Still happening in iOS 17.4.1, FB13759599

how to make separate shadow appearance for UINavigationBar in Xcode 13
 
 
Q