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.
Related
I'm working on an app that I would like to have the following navigation structure:
I want to have a welcome view with "Sign up" and "Sign in" buttons as most of apps have:
First Page
I would like it to be such that this view doesn't have any navigation view bar at the top but the two buttons will navigate to the appropriate page e.g. the sign in page will ask for just login info, sign up page with ask the user for data.
Sign In Page
This however, while seemingly simple has been very confusing to achieve in SwiftUI when it comes to the iPad. When I try to use the Navigation Link it doesn't work as the links are stuck in a side bar that is hidden. I can't seem to find any solutions that work online as nearly everything is for the iPhone. Can anyone advise how to stop the links being placed in a sidebar on iPad?
Thanks a lot
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.
I was finding around the website but i cannot get the source. The menu was semi-transparent which got news feed, profile and etc.
I need the sample that creating something like transparent screen on top of current screen. Someone can link me to there?
I think the following links would helps u a lot...
Transparent Popup screen in Blackberry
Transparent screen...again!?
Creating a transparent screen
How to set popup screen transparent...?
want to get the home screen api called
What does
<meta name="apple-mobile-web-app-status-bar-style" content="black">
do -- can someone explain with an example?
I found this line in the official Safari Developer Library
This meta tag has no effect unless you
first specify full-screen mode as
described in “url.”
But which url?
What is the benefit of this meta tag?
First, the apple-mobile-web-app-capable hint has to be set for that to even work. This hint causes a web application to run in full-screen mode: it removes the address bar and navigation buttons you get by default in Mobile Safari. The removed areas are highlighted in red here:
So, once an app is in full-screen mode (i.e. the user has added the website to their home page), you can also control the colour of the remaining thin status bar at the top of the page with apple-mobile-web-app-status-bar-style, highlighted in red here:
Per the docs:
If content is set to default, the status bar appears normal. If set to black, the status bar has a black background. If set to black-translucent, the status bar is black and translucent. If set to default or black, the web content is displayed below the status bar. If set to black-translucent, the web content is displayed on the entire screen, partially obscured by the status bar.
A couple of caveats:
This only works on the first page you load; any navigation away to another page will make the address bar and navigation buttons reappear. So if you want this to work, you have to build a single page website (for multiple 'pages' consider an Ajax page loading approach such as that used in the jQuery Mobile framework).
This only works when you arrive at the web page via an application shortcut icon; if you navigate to the website directly from within Mobile Safari it has no effect.
It changes the top bar w/ the banner and carrier on it and makes it a translucent black.
I am using UIWebView to provide a simple browser in an app. When I go to Wikipedia the search bar at top of the page (mobile version) is never shown in the UIWebView. Scrolling down and back up does not make it visible.
I tried both cases (YES/NO) for scalesPageToFit but did not do anything.
The problem is that Wikipedia is reading the user agent string and deciding not to show the search bar. (UIWebView's user agent is slightly different than mobile Safari's user agent.) Unfortunately, it looks like you cannot change the user agent string used by UIWebView.