Initial commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// RenQuYinDaoVIew.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/8.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RenQuYinDaoVIew.h"
|
||||
#import "IfishUserDefaultHelper.h"
|
||||
@interface RenQuYinDaoVIew()
|
||||
@property (nonatomic,strong) UIImageView *yinDaoView;
|
||||
@end
|
||||
@implementation RenQuYinDaoVIew
|
||||
|
||||
-(id)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
UIView *holdView =[[UIView alloc] initWithFrame:CGRectMake(0,0, frame.size.width,6)];
|
||||
holdView.backgroundColor = [UIColor blackColor];
|
||||
holdView.alpha = 0.6;
|
||||
[self addSubview:holdView];
|
||||
[self bringSubviewToFront:self.yinDaoView];
|
||||
[self yinDaoImg];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)yinDaoImg
|
||||
{
|
||||
self.yinDaoView = [[UIImageView alloc] init ];
|
||||
self.yinDaoView.userInteractionEnabled = YES;
|
||||
[self addSubview:self.yinDaoView];
|
||||
self.yinDaoView.image = [UIImage imageNamed:@"signin_prompt"];
|
||||
if (self.frame.size.width ==320) {
|
||||
|
||||
self.yinDaoView.frame = CGRectMake(0,6, self.frame.size.width,kScreenSize.height);
|
||||
}else{
|
||||
self.yinDaoView.frame = CGRectMake(0,0, self.frame.size.width,kScreenSize.height);
|
||||
}
|
||||
|
||||
|
||||
self.yinDaoView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
|
||||
self.yinDaoView.userInteractionEnabled = YES;
|
||||
[self.yinDaoView addGestureRecognizer:tap];
|
||||
|
||||
}
|
||||
|
||||
-(void)dismissSelfViewTap{
|
||||
[IfishUserDefaultHelper IfishTaskIsShowed:YES];
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user