YHExplorerViewController.h 1.66 KB
//
//  YHExplorerViewController.h
//  YohoExplorerDemo
//
//  Created by gaoqiang xu on 2/27/15.
//  Copyright (c) 2015 gaoqiang xu. All rights reserved.
//

#import "CDVViewController.h"
#import "CDVCommandDelegateImpl.h"
#import "CDVCommandQueue.h"
#import "CDVYHInterfaceDelegate.h"
#import "YHLinkDefaultParser.h"
#import "YHExplorerWebViewDelegate.h"

@protocol YHExplorerDelegate;


@interface YHExplorerViewController : CDVViewController
<CDVYHInterfaceDelegate, YHExplorer>

/**
 *  存放一些自动跳转的scheme,目前有itms-apps, itms-appss
 可以往里面补充
 */
@property (strong, nonatomic) NSMutableArray * _Nonnull autoSchemes;
@property (strong, nonatomic) NSMutableArray * _Nonnull autoHosts;

// 进度条功能的启动/停用
@property (nonatomic) BOOL progressBarEnabled;
// 本地机能列表
@property (readonly, strong, nonatomic) NSMutableArray * _Nonnull nativeAbilities;
// 自动处理默认的scheme跳转,如itms-apps
@property (nonatomic) BOOL automaticallySchemeHandle;
// 网页的title
@property (readonly, copy, nonatomic) NSString * _Nonnull pageTitle;
//滚动条所在的navibar
@property (weak, nonatomic) UINavigationBar * _Nullable currentNaviBar;
// 网页交互代理(包含UIWebView的代理)
@property (weak, nonatomic) id <YHExplorerDelegate> _Nullable delegate;
/**
 *  使用一个url初始化
 *
 *  @param url 地址
 *
 *  @return instance
 */
- (instancetype _Nonnull)initWithUrl:(NSString * _Nonnull)url;

- (instancetype _Nonnull)initWithCurrentNaviBar:(UINavigationBar * _Nonnull)currentNaviBar;
@end

@interface YHExplorerCommandDelegate : CDVCommandDelegateImpl
@end

@interface YHExplorerCommandQueue : CDVCommandQueue
@end