• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to avoid user interaction in WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to avoid user interaction in WebView


  • Subject: Re: How to avoid user interaction in WebView
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 30 Jan 2015 09:03:11 -0800

On Jan 30, 2015, at 7:47 AM, Juanjo Conti <email@hidden> wrote:
>
> Hi! This is my first email in this list. I'm working with Cocoa (using
> Swift) on a Mac Os X screensaver.
>
> I'd like to use a WebView to show different web pages but I don't want the
> user to be able to interact with the page. This is: no clicking, no
> scrolling, no keystrokes firing events in the web pages...
>
> How can I achieve this?

The easiest and most resilient approach might be to add a local event monitor (using +[NSEvent addLocalMonitor…]) that filters out all keyboard and mouse events targeted at your window. Especially since you probably want any of these actions to dismiss the screensaver.

You’ll want to be careful to restrict this only to the window that draws your screensaver, and only to keyboard/mouse/other input events.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: How to avoid user interaction in WebView
      • From: Juanjo Conti <email@hidden>
References: 
 >How to avoid user interaction in WebView (From: Juanjo Conti <email@hidden>)

  • Prev by Date: Re: copyWithZone archive/unarchive
  • Next by Date: Core Data concurrency during import of folder contents
  • Previous by thread: How to avoid user interaction in WebView
  • Next by thread: Re: How to avoid user interaction in WebView
  • Index(es):
    • Date
    • Thread