I am using web view in my app but i don't want the search bar at the top i want it to hide or remove from webview so can any one give me the solution for it.
Your question needs a bit of clarification. Is this a web app running in Safari on iPhone? A UIWebview doesn't have a search bar, so I'm assuming this is a web app, in which case add this meta tag to the web content:-
<meta name="apple-mobile-web-app-capable" content="yes">
...but this only works if when the user adds the page to their 'home view' (Springboard). For more information, see:-
http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html
Related
Is it possible to hide (completely remove, not change the styling) the iOS Safari status bar in a homescreen web app?
When you browse a webpage in Safari in a landscape mode the status bar disappears together with the rest of the browser chrome after starting to scroll.
The web app that I'm adding to the homescreen if fitted to the size of the display so is no scrollable.
After setting:
<meta content='initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<meta content='yes' name='apple-mobile-web-app-capable'>
<meta content='white-translucent' name='apple-mobile-web-app-status-bar-style'>
All the browser chrome is gone, but the status bar information is still overlaid over the top of the page regardles of the screen orientation. Is it possible to hide it?
There is no direct method for this (see: similar question) but... this link seems promising:
Everything Hybrid Web Apps Need to Know About the Status Bar in iOS7
The summary of the link is as below:
Key Comments (at link):
When viewing sites in Safari you do not have the ability to customize
the status bar in any way. Previous versions of iOS offered the
ability to view sites in full screen mode, but that was removed in
iOS7, see
http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review.
Key Notes (in link):
StatusBar Cordova Plugin
With iOS7 Apple introduced some native Objective C APIs to control the
status bar. Because of Cordova, we have the ability to bridge these
native APIs directly into JavaScript APIs.
Luckily for us #shazron has already done this with the StatusBar plugin.
After adding the plugin to your application, you are given a StatusBar
object with a number of methods to manipulate the status bar in
JavaScript directly.
...
You can hide the status bar using StatusBar.hide(), or even change its
background color with StatusBar.backgroundColorByName() or
StatusBar.backgroundColorByHexString().
For example, the following sets the status bar to green.
<script>
document.addEventListener('deviceready', function() {
StatusBar.overlaysWebView(false);
StatusBar.backgroundColorByName('green');
}, false);
</script>
...
Outstanding Issues
While the web has come up with workarounds for most of the iOS7 status
bar issues, there are still a few that remain unresolved.
The status bar still overlays content displayed in a cordova InAppBrowser.
There is no known workaround, but a fix is slated for cordova 3.2.
The StatusBar plugin does not work in apps that lock the device into landscape mode.
Key Critic Comment (at link):
These solutions seem to be working only for Phonegap applications, for
us who don't use this and simply wrap our apps in a webview it seems
the only easy solution is to set the webview's top property to 20
instead of zero and that takes care of the issue at hand.
I have a web application that I had previously setup the meta tags needed to support the iPhone with a homescreen bookmark. The website worked fine in safari, and as the bookmark with the apple-mobile-web-app-capable set to yes so it removed the browser controls when you used the home screen link.
Now that the iPhone 5 is out, I realized that with the viewport settings I had on the page it was showing the site with black bars at the top and bottom of the screen. I have since changed my viewport meta tag so that it would use the full screen of the iPhone 5. However the only way for the home screen bookmark to use the new viewport tags and go full screen is to remove the bookmark, and re-add it.
Is there another way to set things up so that everyone that has the homescreen bookmark already installed will not need to remove, and re-add it for the site to go full screen?
This is the solution I found by Burlin on Gist. Works a treat. https://gist.github.com/3840737
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
I need to create an APP and all I know is web coding for mobile devices.
Nor do I have a Apple Computer to write the code.
What is the code to display a loading screen and then load in a mobile themed website without the url bar and the bookmark bar?
Is there a tutorial on this?
In the head of your HTML:
<meta name="apple-mobile-web-app-capable" content="yes">
It will only affect users who add the page to their home screen, though.
For the splash screen:
Your startup image must be 320x460 pixels.
Further details at: http://developer.apple.com/library/safari/#documentation/appleapplications/reference/SafariHTMLRef/Articles/MetaTags.html
Is it possible to build a website that is hiding the browser chrome on iOS5 while still linking to external websites? The browser chrome should not be shown when the external site his opened.
This is only possible when the website is added to the home screen and contains this meta tag:
<meta name="apple-mobile-web-app-capable" content="yes" />
You can't hide the chrome from the Safari app itself.
I found this works,
$('body').delay('1000').animate({ scrollTop: '0px' }, 'slow');
I noticed that scrolling down removed it, so scrolled 60px (height of the chrome), but that hide it and scrolled down the page, but a scroll of 0px, assuming your page has started at the top no on a # target, fools it!
I guess you could even remove the delay and animate, but I wanted it to be smooth, and not too jerky.
I want to place an icon on the iPhone screen form my application, like placing an icon and if i will touch that icon it will do the desired operation, like opening a sound file or an image.
So i want to ask is it possible to place an icon on screen through an application and do some events on it.
Regards,
Vishal
You can't do that. The only icon that will appear on the iPhone home screen will be the icon for your application itself.
Edit:
Expanding on the web shortcut idea suggested by Gene, it might be possible you achieve what you want by having a web short cut using a specific protocol handler to open your app with a web short cut added to the home screen. Take a look at this article:
http://www.mobileorchard.com/apple-approved-iphone-inter-process-communication/
I believe that would still require the user to add the shortcut though, I don't think a third party app can add web shortcuts.
I found it annoying that google maps cannot be page bookmarked onto the home screen. Here is an almost quick solution:
Create a Tiny URL of the target Google Map. SF Bay Area Traffic is http://maps.google.com/maps?hl=en&ie=UTF8&ll=37.55111,-122.121277&spn=0.810034,1.182404&z=10&layer=t
Mail yourself the Tiny URL.
Select the URL in the email application.
Before Safari realizes that it is a Google Map url, touch the x on the url line to cancel the transfer to the Google Map App.
Touch the + at the bottom of Safari and touch "Add to Home Screen"
Name it appropriately and, there you have it, a Google Map entry on your home screen.
Andynormancx is correct. The only exception to this rule (that I know of) is a web shortcut -- within Mobile Safari, you can select "add to home screen", and a shortcut to the bookmarked page will appear on Springboard. The icon is a partial screenshot of the web page.
I don't know if this would be useful to you, though I suppose you could bookmark a link to a sound file or image.
What you can do is create an application and under ApplicationDidLoad in your ApplicationViewController.h
You would type in your code. (If you don't have the SDK, then don't post the question with the tags iPhone-SDK and Cocoa.)
In addition to Gene's answer, you may want to set the following meta tags:
<link rel="apple-touch-icon" href="https://path/to/icon.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />