I'm just getting in to programmatic vc's with no more storyboards and I'm following YouTube's LetsBuildThatApp by Brian Voong for guidance https://youtu.be/NJxb7EKXF3U?list=PL0dzCUj1L5JHDWIO3x4wePhD8G4d1Fa6N.
I followed all the directions and for some reason when I launch my app I get this light gray haze over my screen and I can't figure out why? I can faintly see the navigation title and blue background but it's covered by a faded layer.
Step 1: I deleted my storyboard file and sunder the General Tab under Deployment Info I deleted "Main" from Main Interface.
Step 2: I changed my ProjectNavigator file to FeedController then Changed the file accordingly
import UIKit
class FeedController: UICollectionViewController {
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.title = "Facebook Feed"
collectionView?.backgroundColor = UIColor.white
}
}
Step 3: In AppDelegate I added a NavVC and made FeedVC it's root and made the NavVC the Window's root. I also change the NavBar and StatusBar color
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
let feedController = FeedController(collectionViewLayout: UICollectionViewFlowLayout())
let navVC = UINavigationController(rootViewController: feedController)
window?.rootViewController = navVC
UINavigationBar.appearance().tintColor = UIColor.blue
UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.white]
application.statusBarStyle = .lightContent
return true
}
Step 4:
In info.plist
I set View controller-based status bar appearance
to NO
I can't figure out why I get this light gray haze over my screen
What am I missing here?