Press ESC to close

iOS Removing the Status Bar

If you are playing a game or want to avoid events that would distract the user, you need to remove the status bar. Because if a notification comes, both the user and the attention can be distracted. For this reason, you need to make your application full screen. In this writing, I’m going to talk about how to get the status bar together with Swift.

To remove the status bar we will do it in our info.plist file. We can remove the status bar with the permissions we give here. First we click on the plus icon next to Supported Interface Orientations and add a new key here. This key

“View controller-based status bar appearance”

It will be. The meaning of this key is to look at the status bar and we will prevent it from appearing by saying NO to its value. Hen then we need to add another key. Again, click on the plus symbol next to the key above to add the key below.

“Status bar is initially hidden”

This key asks if we should check the status bar at the start. We set the value of this key to YES. So if the status bar initially appears, it will be checked and hidden. Our info.plist file looks like below.

If you have any questions, you can reach us by email or comment.

Leave a Reply

Your email address will not be published. Required fields are marked *