Group Group Group Group Group Group Group Group Group

Chapter 36 - UINavigationBar appearance proxy missing properties

I’m working on the UIAppearance section of chapter 36 and am trying to use the UINavigationBar appearance proxy to globally set the barTintColor property. The book uses the following code:

UINavigationBar.appearance().barTintColor = UIColor.black

When I try it, it looks like UINavigationBar.appearance() doesn’t have a barTintColor property (see below)

Does anybody have any suggestions?

Yes it doesn’t look like it autocompletes the barTintColor. Regardless it should still work on your code

1 Like

You’re right! Thanks! I wasted hours on this :rage:. I guess it’s a good lesson not to always trust auto-complete. Do you have any idea why this doesn’t auto-complete?

It’s probably Xcode bug