Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加控制点击是否能跳转的参数 #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions XHLaunchAd/XHLaunchAd/XHLaunchAd.m
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ -(void)removeAndAnimated:(BOOL)animated{
-(void)clickAndPoint:(CGPoint)point{
self.clickPoint = point;
XHLaunchAdConfiguration * configuration = [self commonConfiguration];
if(configuration.allowTouch == NO) {
return;
}
#pragma clang diagnostic push
#pragma clang diagnostic ignored"-Wdeprecated-declarations"
if ([self.delegate respondsToSelector:@selector(xhLaunchAd:clickAndOpenURLString:)]) {
Expand Down
3 changes: 3 additions & 0 deletions XHLaunchAd/XHLaunchAd/XHLaunchAdConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ typedef NS_ENUM(NSInteger , ShowFinishAnimate) {
/** 点击打开页面参数 */
@property (nonatomic, strong) id openModel;

/** 是否允许点击跳转(默认为允许) */
@property (nonatomic,assign) BOOL allowTouch;

/** 自定义跳过按钮(若定义此视图,将会自定替换系统跳过按钮) */
@property(nonatomic,strong) UIView *customSkipView;

Expand Down
4 changes: 4 additions & 0 deletions XHLaunchAd/XHLaunchAd/XHLaunchAdConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ +(XHLaunchImageAdConfiguration *)defaultConfiguration{
configuration.skipButtonType = SkipTypeTimeText;
//后台返回时,是否显示广告
configuration.showEnterForeground = NO;
//允许点击跳转
configuration.allowTouch = YES;
return configuration;
}

Expand Down Expand Up @@ -65,6 +67,8 @@ +(XHLaunchVideoAdConfiguration *)defaultConfiguration{
configuration.showEnterForeground = NO;
//是否静音播放
configuration.muted = NO;
//允许点击跳转
configuration.allowTouch = YES;
return configuration;
}
@end