70 lines
1.8 KiB
Objective-C
70 lines
1.8 KiB
Objective-C
//
|
|
// UserGuardViewController.m
|
|
// GIGA
|
|
//
|
|
// Created by lianxiang on 2018/8/21.
|
|
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
|
//
|
|
|
|
#import "UserGuardViewController.h"
|
|
#import "Masonry.h"
|
|
#import "GiGaUserDefault.h"
|
|
|
|
@interface UserGuardViewController ()
|
|
|
|
@end
|
|
|
|
@implementation UserGuardViewController
|
|
|
|
- (void)viewDidLoad {
|
|
[super viewDidLoad];
|
|
//self.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
|
|
|
|
[self creatUI];
|
|
|
|
}
|
|
|
|
|
|
-(void)creatUI{
|
|
|
|
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);
|
|
}];
|
|
|
|
}
|
|
|
|
-(void)dismisBtnAction{
|
|
|
|
[GiGaUserDefault saveUsergaurdflag:YES];
|
|
[self dismissViewControllerAnimated:NO completion:^{
|
|
NC_POST_NAME_OBJECT(USER_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
|