酷店

ALPJumpFailedStrategy.h 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // ALPJumpFailedStrategy.h
  3. // AlibcLinkPartnerSDK
  4. //
  5. // Created by czp on 16/11/24.
  6. // Copyright © 2016年 czp. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSInteger, ALPJumpFailedMode)
  10. {
  11. ALPJumpFailedModeOpenH5 = 0,//降级到h5(默认)
  12. ALPJumpFailedModeOpenDownloadPage = 1,//跳转到下载页
  13. ALPJumpFailedModeOpenBrowser = 2,//跳转到浏览器
  14. ALPJumpFailedModeOpenNone = 3 //不处理返回错误信息
  15. };
  16. @protocol ALPJumpFailedStrategyDelegate <NSObject>
  17. - (void)failToShowH5WithUrl:(NSString *)url;
  18. @end
  19. @interface ALPJumpFailedStrategy : NSObject
  20. /**
  21. * 跳转失败处理(可选),不设置默认跳转失败,返回错误信息
  22. */
  23. @property (nonatomic, assign) ALPJumpFailedMode failedMode;
  24. /**
  25. * 跳转失败H5页面打开时,自定义webview
  26. */
  27. @property (nonatomic, strong) UIWebView *webview;
  28. /**
  29. * 跳转失败,自定义显示webview的代理
  30. */
  31. @property (nonatomic, weak) id<ALPJumpFailedStrategyDelegate> failToH5Delegate;
  32. @end