cdts/xdts-ios 3/Pods/GYSDK/GeYanSdk.framework/Headers/GyAuthViewModel.h

643 lines
18 KiB
C
Raw Normal View History

2023-07-27 09:20:00 +08:00
//
// GyAuthViewModel.h
// GySdkLib
//
// Created by lzy on 2019/7/19.
// Copyright © 2019 getui. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GyAuthPrivacyItem.h"
NS_ASSUME_NONNULL_BEGIN
/**
* @abstract customAreaView为授权页面的view
*/
typedef void(^OLCustomUIHandler)(UIView *customAreaView);
/**
* @abstract 1
2
3
4123
5size默认都可以不用设置
6x轴方向偏移量有两个值可以设置portraitCenterXOffset为控件的x轴中点到弹窗x轴中点的距离portraitLeftXOffset为控件的左边缘到屏幕左边缘的距离
*/
typedef struct OLRect {
/**
*/
CGFloat portraitTopYOffset;
/**
x轴中点到屏幕x轴中点的距离0
x轴中点到弹窗x轴中点的距离0
*/
CGFloat portraitCenterXOffset;
/**
0
0
portraitLeftXOffset与portraitCenterXOffset设置一个即可portraitLeftXOffset优先级大于portraitCenterXOffset
portraitCenterXOffset属性失效
*/
CGFloat portraitLeftXOffset;
/**
*/
CGFloat landscapeTopYOffset;
/**
x轴中点到屏幕x轴中点的距离0
x轴中点到弹窗x轴中点的距离0
*/
CGFloat landscapeCenterXOffset;
/**
0
0
landscapeLeftXOffset与landscapeCenterXOffset设置一个即可landscapeLeftXOffset优先级大于landscapeCenterXOffset
landscapeCenterXOffset属性失效
*/
CGFloat landscapeLeftXOffset;
/**
0size才会生效size
*/
CGSize size;
} OLRect;
/**
* @abstract
*/
typedef NS_ENUM(NSInteger, OLAuthPopupAnimationStyle) {
OLAuthPopupAnimationStyleCoverVertical = 0,
OLAuthPopupAnimationStyleFlipHorizontal,
OLAuthPopupAnimationStyleCrossDissolve,
OLAuthPopupAnimationStyleCustom
};
/**
* Loading
* containerView为loading的全屏蒙版view
* containerView添加自定义loading
* block后loading将无效
*/
typedef void(^OLLoadingViewBlock)(UIView *containerView);
/**
* Loading[GeyanSDK stopLoading]
* containerView为loading的全屏蒙版view
*/
typedef void(^OLStopLoadingViewBlock)(UIView *containerView);
/**
*
* @param viewLifeCycle viewDidLoadviewWillAppearviewWillDisappearviewDidAppearviewDidDisappear
* @param animated
*/
typedef void(^OLAuthViewLifeCycleBlock)(NSString *viewLifeCycle, BOOL animated);
/**
*
*/
typedef void(^OLClickAuthButtonBlock)(void);
/**
*
*/
typedef BOOL(^OLProtocolHintBlock)(void);
/**
*
*/
typedef void(^OLClickCheckboxBlock)(BOOL isChecked);
/**
*
*/
typedef void(^OLTapAuthBackgroundBlock)(void);
/**
* @abstract frame
*/
typedef void(^OLAuthVCTransitionBlock)(CGSize size, id <UIViewControllerTransitionCoordinator> coordinator, UIView *customAreaView);
/**
* @abstract modal present
*/
typedef NS_ENUM(NSInteger, OLPullAuthVCStyle) {
OLPullAuthVCStyleModal,
OLPullAuthVCStylePush
};
@interface GyAuthViewModel : NSObject
#pragma mark - Status Bar/状态栏
/**
`UIStatusBarStyleDefault`
*/
@property(nonatomic, assign) UIStatusBarStyle statusBarStyle;
#pragma mark - Navigation/导航
/**
*/
@property(nullable, nonatomic, strong) NSAttributedString *naviTitle;
/**
*/
@property(nullable, nonatomic, strong) UIColor *naviBgColor;
/**
*/
@property(nullable, nonatomic, strong) UIImage *naviBackImage;
/**
*/
@property(nullable, nonatomic, strong) UIView *naviRightControl;
/**
*/
@property(nonatomic, assign) BOOL naviHidden;
/**
size为CGSizeMake(40, 40)
*/
@property(nonatomic, assign) OLRect backButtonRect;
/**
*/
@property(nonatomic, assign) BOOL backButtonHidden;
#pragma mark - Logo/图标
/**
"applogo"
*/
@property(nullable, nonatomic, strong) UIImage *appLogo;
/**
Logo
*/
@property(nonatomic, assign) OLRect logoRect;
/**
Logo
*/
@property(nonatomic, assign) BOOL logoHidden;
/**
logo圆角0
*/
@property(nonatomic, assign) CGFloat logoCornerRadius;
#pragma mark - Phone Number Preview/手机号预览
/**
*
*/
@property(nullable, nonatomic, strong) UIColor *phoneNumColor;
/**
* 24pt
*/
@property(nullable, nonatomic, strong) UIFont *phoneNumFont;
/**
*
*/
@property(nonatomic, assign) OLRect phoneNumRect;
#pragma mark - Switch Button/切换按钮
/**
*
*/
@property(nullable, nonatomic, copy) NSString *switchButtonText;
/**
*
*/
@property(nullable, nonatomic, strong) UIColor *switchButtonColor;
/**
* nil
*/
@property(nullable, nonatomic, strong) UIColor *switchButtonBackgroundColor;
/**
* 15pt
*/
@property(nullable, nonatomic, strong) UIFont *switchButtonFont;
/**
*
*/
@property(nonatomic, assign) OLRect switchButtonRect;
/**
*
*/
@property(nonatomic, assign) BOOL switchButtonHidden;
#pragma mark - Authorization Button/认证按钮
/**
* , @[, , ], ,
*/
@property(nullable, nonatomic, strong) NSArray<UIImage *> *authButtonImages;
/**
* "一键登录"
*/
@property(nullable, nonatomic, strong) NSAttributedString *authButtonTitle;
/**
*
*/
@property(nonatomic, assign) OLRect authButtonRect;
/**
* 5
*/
@property(nonatomic, assign) CGFloat authButtonCornerRadius;
/**
*
*/
@property(nullable, nonatomic, copy) OLClickAuthButtonBlock clickAuthButtonBlock;
#pragma mark - Slogan/口号标语
/**
* Slogan
*/
@property(nonatomic, assign) OLRect sloganRect;
/**
* Slogan
*/
@property(nonatomic, strong) UIColor *sloganTextColor;
/**
* Slogan字体, 12pt
*/
@property(nonatomic, strong) UIFont *sloganTextFont;
#pragma mark - CheckBox & Privacy Terms/隐私条款勾选框及隐私条款
/**
* YES
*/
@property(nonatomic, assign) BOOL defaultCheckBoxState;
/**
* 12x12
*/
@property(nullable, nonatomic, strong) UIImage *checkedImage;
/**
* 12x12
*/
@property(nullable, nonatomic, strong) UIImage *uncheckedImage;
/**
*
*/
@property(nonatomic, assign) CGSize checkBoxSize;
/**
* , 12pt
*/
@property(nullable, nonatomic, strong) NSDictionary<NSAttributedStringKey, id> *privacyTermsAttributes;
/**
* index为0.
*/
@property(nullable, nonatomic, strong) NSArray<GyAuthPrivacyItem *> *additionalPrivacyTerms;
/**
*
*/
@property(nullable, nonatomic, strong) UIColor *termTextColor;
/**
* 5020
*/
@property(nonatomic, assign) OLRect termsRect;
/**
* 4
* @[@"登录即同意", @"", @"", @"并使用本机号码登录"]
*/
@property(nullable, nonatomic, copy) NSArray<NSString *> *auxiliaryPrivacyWords;
/**
*
*/
@property(nullable, nonatomic, copy) OLClickCheckboxBlock clickCheckboxBlock;
/**
* NSTextAlignmentLeft
*/
@property(nonatomic, assign) NSTextAlignment termsAlignment;
/**
*
* PrivacyItem设置了回调将不会走这里
*/
@property(nullable, nonatomic, copy) OLPrivacyTermItemBlock carrierTermItemBlock;
/**
*
* NO
*/
@property(nonatomic, assign) BOOL hasQuotationMarkOnCarrierProtocol;
/**
*
* @{
* NSUnderlineStyleAttributeName: @NO,
* NSForegroundColorAttributeName: UIColor.redColor
* }
*/
@property(nonatomic, nullable, copy) NSDictionary *activeLinkAttributes;
/**
*
* YES
*/
@property(nonatomic, assign) BOOL showNotCheckProtocolHint;
/*
* y轴偏移量
* 0
*/
@property(nonatomic, assign) CGFloat protocolHintOffsetY;
/**
*
* YESsdk内置toast
* NOtoast
*/
@property(nullable, nonatomic, copy) OLProtocolHintBlock protocolHintBlock;
#pragma mark - Custom Area/自定义区域
/**
* block
* @discussion
* 使NSLayoutConstraint与相关的视图进行布局约束
* , , , ,
* , , , ,
*/
@property(nullable, nonatomic, copy) OLCustomUIHandler customUIHandler;
/**
* frame
*/
@property(nullable, nonatomic, copy) OLAuthVCTransitionBlock authVCTransitionBlock;
#pragma mark - Background Image/授权页面背景图片
/**
*
*/
@property(nullable, nonatomic, strong) UIColor *backgroundColor;
/**
*
*/
@property(nullable, nonatomic, strong) UIImage *backgroundImage;
/**
*
*/
@property(nullable, nonatomic, strong) UIImage *landscapeBackgroundImage;
/**
* gif.
*/
@property(nullable, nonatomic, strong) NSString *backgroundGifPath;
/**
* video.
*/
@property(nullable, nonatomic, strong) NSString *backgroundVideoPath;
/**
* GIF video
* YES
*/
@property (nonatomic, assign) BOOL allowGifOrVideoPlayRepeat;
#pragma mark - orientationMask
/**
*
*/
@property(nonatomic, assign) UIInterfaceOrientationMask supportedInterfaceOrientations;
#pragma mark - Popup
/**
*
*/
@property(nonatomic, assign) BOOL isPopup;
/**
x轴偏移只支持portraitLeftXOffset和landscapeLeftXOffset
*/
@property(nonatomic, assign) OLRect popupRect;
/**
6
*/
@property(nonatomic, assign) CGFloat popupCornerRadius;
/**
popupCornerRadius设置圆角大小popupRectCorners设置需要设置圆角的位置
popupRectCorners数组元素不超过四个@[@(UIRectCornerTopLeft), @(UIRectCornerTopRight)]
*/
@property(nonatomic, strong) NSArray<NSNumber *> *popupRectCorners;
/**
* popupAnimationStyle为OLAuthPopupAnimationStyleStyleCustom时CATransition对象来设置动画
*/
@property(nonatomic, assign) OLAuthPopupAnimationStyle popupAnimationStyle;
/**
*
*/
@property(nonatomic, strong, nullable) CAAnimation *popupTransitionAnimation;
/**
*/
@property(nullable, nonatomic, strong) UIImage *closePopupImage;
/**
*/
@property(nonatomic, strong) NSNumber *closePopupTopOffset;
/**
*/
@property(nonatomic, strong) NSNumber *closePopupRightOffset;
/**
11x22
*/
@property(nonatomic, assign) CGSize closePopupSize;
/**
*/
@property(nonatomic, assign) BOOL canClosePopupFromTapGesture;
/**
*
*/
@property(nonatomic, copy, nullable) OLTapAuthBackgroundBlock tapAuthBackgroundBlock;
/**
*
*
*/
@property(nonatomic, strong, nullable) UIView *popupMaskView;
#pragma mark - Loading
/**
*
*/
@property(nonatomic, copy, nullable) OLLoadingViewBlock loadingViewBlock;
/**
* [GetanSDK stopLoading]
*/
@property(nonatomic, copy, nullable) OLStopLoadingViewBlock stopLoadingViewBlock;
#pragma mark - WebViewController Navigation/服务条款页面导航栏
/**
*
*/
@property(nonatomic, assign) BOOL webBackBtnHidden;
/**
*
*/
@property(nonatomic, strong) UIImage *webBackBtnImg;
/**
size为CGSizeMake(40, 40)
*/
@property(nonatomic, assign) OLRect webBackBtnRect;
/**
*/
@property(nonatomic, assign) BOOL webNaviHidden;
/**
"服务条款"17pt
*/
@property(nullable, nonatomic, strong) NSAttributedString *webNaviTitle;
/**
*/
@property(nullable, nonatomic, strong) UIColor *webNaviBgColor;
#pragma mark - Hint
/**
"请同意服务条款"
*/
@property(nullable, nonatomic, copy) NSString *notCheckProtocolHint;
#pragma mark - OLAuthViewLifeCycleBlock
/**
*/
@property(nullable, nonatomic, copy) OLAuthViewLifeCycleBlock viewLifeCycleBlock;
#pragma mark - UIModalPresentationStyle
/**
present授权页面时的样式UIModalPresentationFullScreen
*/
@property(nonatomic, assign) UIModalPresentationStyle modalPresentationStyle;
/**
* present授权页面时的自定义动画
*/
@property(nonatomic, strong, nullable) CAAnimation *modalPresentationAnimation;
/**
* dismiss授权页面时的自定义动画
*/
@property(nonatomic, strong, nullable) CAAnimation *modalDismissAnimation;
#pragma mark - OLPullAuthVCStyle
/**
* @abstract modal present
*/
@property(nonatomic, assign) OLPullAuthVCStyle pullAuthVCStyle;
/**
* presentViewController pushViewController animated YES
*/
@property(nonatomic, assign) BOOL pullAnimate;
#pragma mark - UIUserInterfaceStyle
/**
* @abstract UIUserInterfaceStyle UIUserInterfaceStyleLight @(UIUserInterfaceStyleLight)
*
* UIUserInterfaceStyle
* UIUserInterfaceStyleUnspecified -
* UIUserInterfaceStyleLight -
* UIUserInterfaceStyleDark - iOS 13+
*/
@property(nonatomic, strong) NSNumber *userInterfaceStyle;
@end
NS_ASSUME_NONNULL_END