UIWebView.h

来源:互联网 发布:如何制作淘宝csv文件 编辑:程序博客网 时间:2024/05/04 06:38

//

//  UIWebView.h

//  UIKit

//

//  Copyright (c) 2007-2012, Apple Inc. All rights reserved.

//

#import<Foundation/Foundation.h>

#import<UIKit/UIView.h>

#import<UIKit/UIKitDefines.h>

#import<UIKit/UIDataDetectors.h>

#import<UIKit/UIScrollView.h>


typedefNS_ENUM(NSInteger, UIWebViewNavigationType) {

    UIWebViewNavigationTypeLinkClicked,

    UIWebViewNavigationTypeFormSubmitted,

    UIWebViewNavigationTypeBackForward,

    UIWebViewNavigationTypeReload,

    UIWebViewNavigationTypeFormResubmitted,

    UIWebViewNavigationTypeOther

};


@classUIWebViewInternal;

@protocolUIWebViewDelegate;


NS_CLASS_AVAILABLE_IOS(2_0)@interface UIWebView :UIView <NSCoding,UIScrollViewDelegate> { 

 @private

   UIWebViewInternal *_internal;

}


@property(nonatomic,assign)id<UIWebViewDelegate> delegate;


@property(nonatomic,readonly,retain) UIScrollView *scrollView NS_AVAILABLE_IOS(5_0);


- (void)loadRequest:(NSURLRequest *)request;

- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL;

- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)textEncodingName baseURL:(NSURL *)baseURL;


@property(nonatomic,readonly,retain)NSURLRequest *request;


- (void)reload;

- (void)stopLoading;


- (void)goBack;

- (void)goForward;


@property(nonatomic,readonly,getter=canGoBack)BOOL canGoBack;

@property(nonatomic,readonly,getter=canGoForward)BOOL canGoForward;

@property(nonatomic,readonly,getter=isLoading)BOOL loading;


- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script;


@property(nonatomic)BOOL scalesPageToFit;


@property(nonatomic)BOOL detectsPhoneNumbers NS_DEPRECATED_IOS(2_0, 3_0);

@property(nonatomic) UIDataDetectorTypes dataDetectorTypesNS_AVAILABLE_IOS(3_0);


@property (nonatomic)BOOL allowsInlineMediaPlaybackNS_AVAILABLE_IOS(4_0);// iPhone Safari defaults to NO. iPad Safari defaults to YES

@property (nonatomic)BOOL mediaPlaybackRequiresUserActionNS_AVAILABLE_IOS(4_0);// iPhone and iPad Safari both default to YES


@property (nonatomic)BOOL mediaPlaybackAllowsAirPlayNS_AVAILABLE_IOS(5_0);// iPhone and iPad Safari both default to YES


@property (nonatomic)BOOL suppressesIncrementalRenderingNS_AVAILABLE_IOS(6_0);// iPhone and iPad Safari both default to NO


@property (nonatomic)BOOL keyboardDisplayRequiresUserAction NS_AVAILABLE_IOS(6_0); // default is YES


@end


@protocol UIWebViewDelegate <NSObject>


@optional

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;

- (void)webViewDidStartLoad:(UIWebView *)webView;

- (void)webViewDidFinishLoad:(UIWebView *)webView;

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error;


@end


原创粉丝点击