I want to set a
background
statusbar
You cannot change the status bar color, as it has not background to change.
However you could create a view on 20px height and place it behind the status bar.
If you have a UINavigationBar, you could either remove the background color of a UINavigationBar or add a subview to the UINavigationBar with a height on 20px and give it the color of the status bar.
I found this on github, you can inspect the code and find out how to change the color for the top 20px https://github.com/remirobert/RRMaterialNavigationBar