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
You’re right! Thanks! I wasted hours on this . I guess it’s a good lesson not to always trust auto-complete. Do you have any idea why this doesn’t auto-complete?
This topic was automatically closed after 166 days. New replies are no longer allowed.