• 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: stripped down webview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stripped down webview


  • Subject: Re: stripped down webview
  • From: Koen van der Drift <email@hidden>
  • Date: Sat, 18 Aug 2012 09:52:03 -0400

On Aug 18, 2012, at 7:24 AM, Koen van der Drift <email@hidden> wrote:

> In my OS X app I show some webpages in a WebView, but I'd like to show them stripped down, remove clutter, e.g. as is done in Evernote and other apps.
>
> Any suggestions where to start? Maybe use a local css file?
>


Answering to myself...


Alright, I found some clues on SO, and am now able to replace the css file with my own by tweaking the DOMDocument.  The only place I could think of to do this is in

- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame

But since the webview loads asynchronously,  I first see the page with the original css for a second or two, and then it changes to the page using my local css file only after the whole page has loaded.

Is there another place where I could hook into so the page shows correctly immediately?


Next is to strip the DOM form all elements I don't need :)

- Koen.





_______________________________________________

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: stripped down webview
      • From: Steve Christensen <email@hidden>
References: 
 >stripped down webview (From: Koen van der Drift <email@hidden>)

  • Prev by Date: stripped down webview
  • Next by Date: Re: Apple Aperture-like look & feel
  • Previous by thread: stripped down webview
  • Next by thread: Re: stripped down webview
  • Index(es):
    • Date
    • Thread