How to launch Safari and open URL from iOS app

Here’s what I did: I created an IBAction in the header .h files as follows: – (IBAction)openDaleDietrichDotCom:(id)sender; I added a UIButton on the Settings page containing the text that I want to link to. I connected the button to IBAction in File Owner appropriately. Then implement the following: Objective-C – (IBAction)openDaleDietrichDotCom:(id)sender { [[UIApplication sharedApplication] openURL:[NSURL … Read more

ipad safari: disable scrolling, and bounce effect?

This answer is no longer applicable, unless you are developing for a very old iOS device… Please see other solutions 2011 answer: For a web/html app running inside iOS Safari you want something like document.ontouchmove = function(event){ event.preventDefault(); } For iOS 5 you may want to take the following into account: document.ontouchmove and scrolling on … Read more

How to debug web sites on mobile devices?

This is the correct answer, not sure why Blaine only left it as a comment! As of iOS 6 Remote Debugging is available: https://stackoverflow.com/a/12762449/72428 On OS X you can use the Safari web inspector on the iOS Simulator AND iOS 6 devices. First enable the Developer menu in Safari on your Desktop. Next, enable remote … Read more

Launching app OR app store from Safari?

It’s not possible to check if app is installed from a web page. You could do it inside an other app by checking if your url scheme can be opened using UIApplication’s -canOpenURL: method, but there is no javascript equivalent to this. However, you can use the following workaround: <script language=”javascript”> function open_appstore() { window.location=’http://itunes.com/’; … Read more

CSS background-size: cover replacement for Mobile Safari

I have had a similar issue recently and realised that it’s not due to background-size:cover but background-attachment:fixed. I solved the issue by using a media query for iPhone and setting background-attachment property to scroll. For my case: .cover { background-size: cover; background-attachment: fixed; background-position: center center; @media (max-width: @iphone-screen) { background-attachment: scroll; } } Edit: … Read more

How do I remove the blue styling of telephone numbers on iPhone/iOS?

Two options… 1. Set the format-detection meta tag. To remove all auto-formatting for telephone numbers, add this to the head of your html document: <meta name=”format-detection” content=”telephone=no”> View more Apple-Specific Meta Tag Keys. Note: If you have phone numbers on the page with these numbers you should manually format them as links: <a href=”https://stackoverflow.com/questions/3736807/tel:+1-555-555-5555″>1-555-555-5555</a> 2. … Read more