GiGaMaskTime/GIGA/Modules/Mask/Controller/GiGaAppGaurdVC.m

72 lines
1.8 KiB
Objective-C

//
// GiGaAppGaurdVC.m
// GIGA
//
// Created by lianxiang on 2018/8/21.
// Copyright © 2018年 com.giga.ios. All rights reserved.
//
#import "GiGaAppGaurdVC.h"
#import "Masonry.h"
#import "GiGaUserDefault.h"
@interface GiGaAppGaurdVC ()
@end
@implementation GiGaAppGaurdVC
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor lightGrayColor];
[GiGaUserDefault saveAppGaurdflag:YES];
[self creatUI];
}
-(void)creatUI{
UIButton *dismisBtn= [UIButton buttonWithType:UIButtonTypeCustom];
[dismisBtn setTitle:@"立即体验" forState:UIControlStateNormal];
dismisBtn.backgroundColor = [UIColor greenColor];
[dismisBtn addTarget:self action:@selector(dismisBtnAction) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:dismisBtn];
[dismisBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(200);
make.height.mas_equalTo(30);
make.centerX.mas_equalTo(self.view.mas_centerX);
make.top.mas_equalTo(self.view.mas_top).offset(200);
}];
dismisBtn.layer.masksToBounds = YES;
dismisBtn.layer.cornerRadius = 15;
}
-(void)dismisBtnAction{
[self dismissViewControllerAnimated:YES completion:^{
NC_POST_NAME_OBJECT(APP_GUARD_DISSMISS, nil);
}];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end