To hide status bar programmatically using swift in IOS is 3 steps procedure. In this post we will show you an example/ tutorial to hide status bar programmatically using swift.
Step 1: Go to info.plist file, select one of its property and click on ‘ + ‘ icon. This will add new row to the file and select ‘ View controller-based status bar appearance ‘ key from the drop down. Set its value to ‘ NO ‘.
|Adding View controller-based status bar appearance key to info.plist file|
Step 2: Open ‘ AppDelegate.swift ‘ and in its ‘ didFinishLaunchingWithOptions ‘ function add below code