Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a bar on top of the iphone screen (below status bar)?

Can someone advise me on how I can implement a "touch to return to call" type of UI as seen in the screenshot below?

enter image description here

My intention is to display the bar on top when my application receives a notification.

Any guide or resources on this will be greatly appreciated

like image 454
Zhen Avatar asked Aug 17 '11 05:08

Zhen


People also ask

How do I show the top bar on my iPhone?

How To Fix A Missing iPhone Status Bar. 99% of the time, restarting your iPhone will fix this problem. On an iPhone 8 or earlier, press and hold the power button until the words “slide to power off” appear on the display.

What is the bar at the top of an iPhone called?

Since 2007, the Safari address bar has been at the top of the iPhone's screen, so if you're a longtime iPhone owner you're likely used to it being there. (Note that sometimes this bar is also called an address bar, other times it's called a tab bar or search bar.)

What are the symbols at the top of my screen?

What Is the Android Status Bar? The status bar on Android is the bar of icons running across the top of your screen. The top right corner is dedicated to the major status of your device, while the left is used for app notifications.


1 Answers

There is several ways how you can place something below your status bar.
1. You can add UIView to UIWindow and position it to be under status bar. Set status bar style to black translucent, so the underneath view will be visible. Resize rootViewController appropriately, so it won't overlap your view.
2. Also, you can set wantsFullScreenLayout property of your rootViewController to true, so it'll cover the entire screen and manage view hierarchy inside it. You also need to set status bar style to black translucent.

Alternatively, you can add views above status bar, but I don't think that this is a good user experience. Here is how you can do that: Add UIView Above All Other Views, Including StatusBar

like image 79
Evgeny Shurakov Avatar answered Nov 16 '22 20:11

Evgeny Shurakov