Have a photography site that I want to prevent image copying from. How can I disable the save image menu that pops up on an iPhone when you hold down your finger on an image?
Try:
document.body.style.webkitTouchCallout='none';
As an aside is it really worth it? Hacks like this do impact user expectations, and your image is on the internet, anyone who wants it can easily get it regardless of whether a context menu has been disabled in the browser they're using.
The solution with CSS (-webkit-touch-callout: none;) as #alex tells, works fine with iOS7 Safari. Thanks.
Related
I am coding a simple app in Xcode and I have ran into a problem. I can not get links to work on the mobile app that go to other links. For example, if I click on the Twitter button at the bottom of the webpage nothing happens, I want that button to lead to the desired link it was supposed to go to. Also, the words in a page on the site are lined up in a vertical column, and I would like to know how to make the text look better in terms on formatting it correctly. Here is a picturePicture Of Simulator The Code
[Image]
Seems like you're adding your WKWebView the right way and the page is loading fine. The problem with the text is actually coming from the CSS of the site as I have the problem in Safari on my phone as well, so if you are the web admin of the site I'd fix it there.
Did you try if the button you are talking about is responsive when accessing through Safari on your phone/simulator? WKWebView does not have a loading bar and it seems "unresponsive" sometimes even though the sites are loading in the back.
When adding your WebView implementation buttons like the privacy policy on the site work fine for me.
Information: I suppose you've seen this dark box appear around a link when you click it on an iPad/iPod/iPhone. If not, click a link, and you'll see it appear and disappear when the new page has loaded.
I have a webapp that is going to be used on all platforms. I use p-tags as links because I don't want a lot of the a-tag default functionality and appearance, and the links are executed via JavaScript.
The problem is that even though I use p-tags, the iPad displays this annoying dark box around the link when you click on it. The dark box is useful to tell the user that they actually managed to click the link while the next page loads, but this webapp loads stuff from localStorage, so there is no need to have this box that clutters the GUI...
How can this box be removed?
Your reason to use paragraph (p-tags) for links is completely a mystery to me. You can control styling via CSS, no matter what tag it is. P-tags are for paragraphs, A-tags are for links. That's the most basic thing in HTML semantics I can think of.
The box you are refering to is "-webkit-tap-highlight-color"
See http://css-infos.net/property/-webkit-tap-highlight-color
I want to create a Setting page in iPhone.
If you used Facebook in iPhone. You see that when we click on the Setting button on the navigationBar, the main page just go to right, but not disappear, and Setting page comes up.
When we click on the setting button again, we go back to the main page.
Do you know how can I create this functionality in iPhone? I appreciate that you give me some tutorial links.
You can grab this JTRevealSidebarDemo and personalize as per your requirement.
There are plenty of other demo available like,
DDMenuController
ZUUIRevealController
I've been using ViewDeck with good success. It's light (2 classes) and easy to implement.
I was trying to find out how Facebook's application MENU works on iPhone and iPad. Once you press the button at the top left, the main screen moves on the right and the menu appears.
I was trying to create the same menu/effect on xCode but I had no luck.
Do anyone here knows how I can do this? can you redirect me to any website that has that kind of information? Or can you please guide me through on how to make such a menu?
Thanks
the facebook app was created with this open source framework three20
also if you cannot find what you want in the framework, I suggest building your own UI elements inside UIViews, that appear, dissappear as you want,
good luck!
I need to find out how to make the menu that appears in mobile safari on the iphone/touch when you tap & hold an element appear on a single tap without having to hold. how would i do this? preferably i would use webkit & no js.
UIWebView does not does not call any methods until a link is actually activated, and it does not expose any information about its subviews. There is no way to do with current SDK, you should file a bug with Apple if you need this functionality.