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

UIWebView open links in Safari

Add this to the UIWebView delegate: (edited to check for navigation type. you could also pass through file:// requests which would be relative links) – (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { if (navigationType == UIWebViewNavigationTypeLinkClicked ) { [[UIApplication sharedApplication] openURL:[request URL]]; return NO; } return YES; } Swift Version: func webView(webView: UIWebView, shouldStartLoadWithRequest request: NSURLRequest, … Read more

Turn off iPhone/Safari input element rounding

On iOS 5 and later: input { border-radius: 0; } input[type=”search”] { -webkit-appearance: none; } If you must only remove the rounded corners on iOS or otherwise for some reason cannot normalize rounded corners across platforms, use input { -webkit-border-radius: 0; } property instead, which is still supported. Of course do note that Apple can … Read more

How do you disable viewport zooming on Mobile Safari?

Edit: may not work after iOS 10, please see touch-action based solution below. Your code is displaying attribute double quotes as fancy double quotes. If the fancy quotes are present in your actual source code I would guess that is the problem. This works for me on Mobile Safari in iOS 4.2. <meta name=”viewport” content=”width=device-width, … Read more

Disable Auto Zoom in Input “Text” tag – Safari on iPhone

You can prevent Safari from automatically zooming in on text fields during user input without disabling the user’s ability to pinch zoom. Just add maximum-scale=1 but leave out the user-scale attribute suggested in other answers. It is a worthwhile option if you have a form in a layer that “floats” around if zoomed, which can … Read more

Is Safari on iOS 6 caching $.ajax results?

After a bit of investigation, turns out that Safari on iOS6 will cache POSTs that have either no Cache-Control headers or even “Cache-Control: max-age=0”. The only way I’ve found of preventing this caching from happening at a global level rather than having to hack random querystrings onto the end of service calls is to set … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)