This commit is contained in:
lianxiang
2018-09-20 00:25:25 +08:00
parent 27e27d5d12
commit 309cae4ab2
56 changed files with 1755 additions and 39 deletions
@@ -124,7 +124,11 @@
NSURL* url = [[NSURL alloc] initWithString:@"http://wsyts.s1.natapp.cc"];
//@"connectParams":@{@"token":@""}
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"extraHeaders":@{@"device":@"ios"},@"token":@""}];
NSString *token = [GiGaUserDefault getCurentToken];
if (!token) {
token = @"";
}
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"extraHeaders":@{@"device":@"ios"},@"token":token}];
_manager = manager;
_client = manager.defaultSocket;
@@ -186,6 +186,7 @@
if (showAppGaurd == NO) {
[self showAPPappGaurdView];
}
//[self showUserGaurdView];
}
-(void)viewWillDisappear:(BOOL)animated{
@@ -198,9 +199,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
// [self.view addSubview:self.tableView];
// self.tableView.backgroundColor = GIGA_MAIN_BGCOLOR;
[self setUpNav];
[self initUI];
[self addNotify];
@@ -545,7 +544,7 @@
}else{
userGuardVC.modalPresentationStyle = UIModalPresentationCurrentContext;
}
userGuardVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
userGuardVC.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3];
[self presentViewController:userGuardVC animated:NO completion:nil];
}
@@ -9,8 +9,10 @@
#import "UserGuardViewController.h"
#import "Masonry.h"
#import "GiGaUserDefault.h"
#import "SHineLabel.h"
@interface UserGuardViewController ()
@property(nonatomic,strong) UIImageView *handimage;
@end
@@ -27,21 +29,93 @@
-(void)creatUI{
UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
// UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
//
// [dismisBtn setTitle:@"知道了" forState:UIControlStateNormal];
// [dismisBtn setTintColor:[UIColor whiteColor]];
// dismisBtn.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
// [dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
// [self.view addSubview:dismisBtn];
//
// [dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(100);
// make.height.mas_equalTo(60);
// make.centerX.mas_equalTo(self.view.mas_centerX);
// make.top.mas_equalTo(self.view.mas_top).offset(200);
// }];
[dismisBtn setTitle:@"知道了" forState:UIControlStateNormal];
[dismisBtn setTintColor:[UIColor whiteColor]];
dismisBtn.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
[dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:dismisBtn];
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(100);
make.height.mas_equalTo(60);
make.centerX.mas_equalTo(self.view.mas_centerX);
make.top.mas_equalTo(self.view.mas_top).offset(200);
//usergaurd_uphand
UIImageView *upimage = [[UIImageView alloc] init];
upimage.image = [UIImage imageNamed:@"userguard_up"];
[self.view addSubview:upimage];
[upimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.and.with.mas_equalTo(20);
make.centerX.mas_equalTo(self.view.mas_centerX).offset(10);
make.top.mas_equalTo(self.view.mas_top).offset(298);
}];
UIImageView *handimage = [[UIImageView alloc] init];
self.handimage = handimage;
handimage.image = [UIImage imageNamed:@"usergaurd_uphand"];
[self.view addSubview:handimage];
[handimage mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(upimage.mas_right).offset(2);
make.size.mas_equalTo(CGSizeMake(50, 60));
make.top.mas_equalTo(self.view.mas_top).offset(301);
}];
SHineLabel *shainLabe = [[SHineLabel alloc] init];
[self.view addSubview:shainLabe];
shainLabe.textColor = [UIColor whiteColor];
shainLabe.outLineColor = [UIColor whiteColor];
shainLabe.blurColor = [UIColor whiteColor];
shainLabe.oinsideColor = [UIColor whiteColor];
shainLabe.fontsize = 18;
shainLabe.text = @"按住面膜向上滑\n敷到脸部开始倒计时";
shainLabe.numberOfLines = 0;
[shainLabe mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(222, 60));
//make.width.mas_equalTo(222);
make.top.mas_equalTo(self.view.mas_top).offset(384);
make.centerX.mas_equalTo(self.view.mas_centerX);
}];
// [self creatnaima];
}
- (void)viewDidAppear:(BOOL)animated
{
[self creatnaima];
}
-(void)creatnaima{
[UIView animateWithDuration:1.0 animations:^{
[UIView setAnimationRepeatCount:MAXFLOAT];
[self->_handimage mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(201);
}];
[self.view layoutIfNeeded];
} completion:^(BOOL finished) {
[self->_handimage mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(301);
}];
[self.view layoutIfNeeded];
}];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[self dismisBtnAction];
}
-(void)dismisBtnAction{
@@ -85,6 +85,7 @@
_countLabel.blurColor = [UIColor whiteColor];
_countLabel.oinsideColor = [UIColor whiteColor];
_countLabel.text = @"00:00";
_countLabel.fontsize = 22;
_countLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:22];
}
return _countLabel;