iPhone: hide address bar, also if user clicks top of screen or clock/battery bar - iphone

I want the address bar to disappear on the iPhone. So far I have used:
window.scrollTo(0, 1);
This hides the address bar when the page is first loaded.
Then I have
document.body.addEventListener('touchmove', function(e){ e.preventDefault(); });
This prevents the user from scrolling back up to the address bar (or anywhere else) while still allowing buttons to be tapped.
But, the address bar still appears when I tap the top of the page. Not sure if this is because I am touching the top of the webpage or because I am touching the bar with the clock and battery.
I'm guessing that the user himself would need to set this option on his phone, although it would be nice if I could control it via the webpage. Is either way possible?
Why? I want to make a web app for a disabled child who has a hard time controlling his movements. I essentially want to turn off any touch actions that aren't related to the web app itself. Otherwise he will accidentally set off lots of unwanted actions. Not sure if this is possible.

I'm afraid you can't hide the status bar. For example in iOS 6 you can, in landscape mode, go full screen, it hides the status bar, but there is a new button at the bottom right of the screen to leave the full screen mode.
What you are asking is not achievable within Safari. But you can develop a simple application full screen (no adress bar, no buttons, no status bar) with a simple UIWebView. This way there will not be any unwanted action.

Related

How to disable android's bottom status bar in Flutter?

Over the past few days, I've been struggling to figure out how to disable the Android device's bottom status (navigation) bar. (As shown in the image below)
Bottom Status Bar on Android
I've looked everywhere and tried everything to find the solution. I tried every method there was to do this, but it didn't work the way I wanted it to. The system overlays, like the bottom and top status bars, can be hidden, but they cannot be entirely disabled or concealed.
I want to know if it is possible to completely disable the status bars. I'm building an app for a marketing MV Player device and the public users can touch or interact with the application but I have to prevent them from exiting the application for security reasons.
I have tried the method given in this answer. The bottom status bar, however, will be hidden; nonetheless, it will become visible if you swipe up to the position of the status bar, or occasionally when you press the bottom of the screen.
You could use the package kiosk_mode to do what you are after. Have a look at this package.

Make application not take over menu bar but still have dock icon?

I'm making an application that I want to function like a status bar app, where it doesn't control the menu bar (so if it's open over, say, Firefox, the menu is still the one for Firefox), but I also want people to be able to cmd-tab to it for keyboard navigation purposes. I know about Application is Agent, but that only flips both those things at once. Is there some more granular control elsewhere that allows me to change these aspects individually?

iPhone app with a 'Left' nav.

I've been asked to create an iphone app with a left nav/menu. Since there are no native UI components to use for this, I was wondering what would be the best way to achieve this. The only app that I remember that had this kind of thing was the Facebook app from about 18months ago.
Is there a good 3rd party API to handle this kind of thing?
Description of the left nav: There is a permanent left nav along the left of the screen running the full length of the screen. When the user selects a menu option a UIView/UIViewController slide in from the right side and covers over the menu. A little button is left stuck to the left side of the screen. If the user selects this button the view slides back to the right again, and the leftnav menu appears from underneath the view and it is possible to interact with again.
Where is the problem? just create a UIView with subview containing UIButtons, you have to layout the buttons yourself (calculate the frame). Later you add that leftmenuView to the UiViewCobtroller.

Customizing the Facebook view

I need the lightblue bar to scroll up (hide) and display the Facebook bar. For example look at this image.
I need the light blue bar (which contains the search bar, refresh button) to be scrolled up, so it hides and displays from the Dark Blue Facebook bar as shown in this image.
I have seen this in many applications but, how can i implement it in my application programatically ?
There's no way to control safari from your app, and since Facebook serves the HTML there's no way to alter that either. So to achieve what you're looking for you could create your own UIWebView and present it modally instead. The issue you'll have here, though, is that you won't have access to the users cookies, so they'll have to log in to Facebook again.

Hide address bar on iPhone

I've seen plenty of scripts on the web about hiding the address bar by scrolling down to hide it etc. But I noticed that Apple actually hide it completely as in make it disappear!
http://help.apple.com/iphone/5/interface/ on your iPhone you will see the bar removed...
How do I do this? Thanks
They're doing event.preventDefault() on the touchstart event and handling scrolling in their own code.
They're not removing it. It's behaving in the same way as every other webpage does in Mobile Safari. The difference appears to be in the way they're displaying the page itself. If you tap on the Status Bar while looking at that webpage the navigation bar appears for you.
I switched my useragent on Safari to Mobile Safari and it looks like they're not actually scrolling the page when you swipe, but have a div setup with overflow:hidden; and you're scrolling inside that div instead of the page itself.
(Edit: This appears to be in addition to hiding the bar by scrolling down the page)
To hide the address bar, use jQuery and execute the following on document load:
jQuery(function($) {
$('html,body').scrollTop(0)
};
The address bar will disappear and will reappear only if the user touches the screen to make it reappear.