iOS 8 removed “minimal-ui” viewport property, are there other “soft fullscreen” solutions?

The minimal-ui viewport property is no longer supported in iOS 8. However, the minimal-ui itself is not gone. User can enter the minimal-ui with a “touch-drag down” gesture. There are several pre-conditions and obstacles to manage the view state, e.g. for minimal-ui to work, there has to be enough content to enable user to scroll; … Read more

Force link to open in mobile safari from a web app with javascript

This is possible. Tested with iOS5 stand-alone web app: HTML: <div id=”foz” data-href=”http://www.google.fi”>Google</div> JavaScript: document.getElementById(“foz”).addEventListener(“click”, function(evt) { var a = document.createElement(‘a’); a.setAttribute(“href”, this.getAttribute(“data-href”)); a.setAttribute(“target”, “_blank”); var dispatch = document.createEvent(“HTMLEvents”); dispatch.initEvent(“click”, true, true); a.dispatchEvent(dispatch); }, false); Can be tested here: http://www.hakoniemi.net/labs/linkkitesti.html

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

Can I change the viewport meta tag in mobile safari on the fly?

I realize this is a little old, but, yes it can be done. Some javascript to get you started: viewport = document.querySelector(“meta[name=viewport]”); viewport.setAttribute(‘content’, ‘width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0′); Just change the parts you need and Mobile Safari will respect the new settings. Update: If you don’t already have the meta viewport tag in the source, you … 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