猎豆优选

ALPJumpFailedStrategy.h 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. ALPJumpFailedModeOpenH5 = 0,//降级到h5(默认)
  11. ALPJumpFailedModeOpenDownloadPage = 1,//跳转到下载页
  12. ALPJumpFailedModeOpenBrowser = 2,//跳转到浏览器
  13. ALPJumpFailedModeOpenNone = 3 //不处理返回错误信息
  14. };
  15. @protocol ALPJumpFailedStrategyDelegate <NSObject>
  16. - (void)failToShowH5WithUrl:(NSString *)url;
  17. @end
  18. @interface ALPJumpFailedStrategy : NSObject
  19. /**
  20. * 跳转失败处理(可选),不设置默认跳转失败,返回错误信息
  21. */
  22. @property (nonatomic, assign) ALPJumpFailedMode failedMode;
  23. /**
  24. * 跳转失败H5页面打开时,自定义webview,直接loadRequest:在该webview上显示
  25. */
  26. @property (nonatomic, strong) UIWebView *webview;
  27. /**
  28. * 跳转失败,自定义显示webview的代理
  29. */
  30. @property (nonatomic, weak) id<ALPJumpFailedStrategyDelegate> failToH5Delegate;
  31. @end