Salut à tous,
c'est quoi un webview de framework webkit??
le code suivant fait quoi??? et comment on l'executra??
j'ai pas trouver une bonne doc sur webkit !!!!!!!

Code objectivec : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#import <Foundation/Foundation.h>
#import <WebKit/WebKit.h>
 
@interface WebRenderer : NSObject
{
       WebView         *_view;
       NSURL        *_url;
       BOOL            _loaded;
}
 
+ (id)newWebRenderInView:(WebView *)inView forURL:(NSURL*)theURL;
- (id)initWebRenderInView:(WebView *)inView forURL:(NSURL*)theURL;
- (BOOL)isLoaded;
- (void)renderHTML;
- (void)renderPDFToFile:(NSString *)inPath;
 
@end
 
@implementation WebRenderer
 
+ (id)newWebRenderInView:(WebView *)inView forURL:(NSURL*)theURL
{
       return [[[WebRenderer alloc] initWebRenderInView:inView forURL:theURL] autorelease];
}
 
- (id)initWebRenderInView:(WebView *)inView forURL:(NSURL*)theURL
{
       if (self = [self init]) {
               _view = inView;
               _url = [theURL retain]  ;
               _loaded = NO  ;
               [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(webPageFinishedLoading:) name:WebViewProgressFinishedNotification object:nil];
       }
       return self;
}
 
- (void)dealloc
{
       [_url release];
       [super dealloc];
}
 
- (void)renderHTML
{
       [[_view mainFrame] loadRequest:[NSURLRequest requestWithURL:_url]];
}
 
- (void)renderPDFToFile:(NSString *)inPath
{
 [[[[[_view mainFrame] frameView] documentView] dataWithPDFInsideRect:[[[[_view mainFrame] frameView] documentView] frame]] writeToFile:inPath atomically:YES];
}
 
- (void)webPageFinishedLoading:(NSNotification *)inNotification
{
       _loaded = YES  ;
}
 
- (BOOL)isLoaded
{
       return _loaded;
}

Merci à tous
Bon développement