| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- //
- // UASBaseVC.m
- // shiku_im
- //
- // Created by ime on 2017/9/22.
- //
- #import "UASBaseVC.h"
- @interface UASBaseVC ()
- @end
- @implementation UASBaseVC
- - (void)viewDidLoad {
-
- [super viewDidLoad];
- self.view.backgroundColor = BGB_COLOR;
- if (self.navigationController) {
-
- [self setLeftView];
-
- }
-
- self.noDataV = [[UIView alloc]initWithFrame:self.view.frame];
-
- [self.view addSubview:self.noDataV];
-
- self.noDataV.hidden = YES;
-
- UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"crm_all_noData"]];
-
- [self.noDataV addSubview:imageView];
-
- [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.centerX.equalTo(self.noDataV);
- make.centerY.equalTo(self.noDataV).offset(-30);
- make.height.mas_equalTo(126);
- make.width.mas_equalTo(100);
-
- }];
-
- [self createUI];
-
- }
- -(void)createUI{
-
-
-
- }
- -(void)setLeftView{
-
- UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
- btn.frame = CGRectMake(0, 5, 22, 22);
- CGFloat imageY = 0;
- if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0) {
- imageY = 5;
- }
- UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(0, imageY, 22, 22)];
- image.image = [UIImage imageNamed:@"icon_back_nor3"];
- [btn addSubview:image];
- [btn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
-
- UIBarButtonItem *bbi2 = [[UIBarButtonItem alloc]initWithCustomView:btn];
-
- self.navigationItem.leftBarButtonItems = @[bbi2];
-
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- -(void)backAction{
-
- if (self.navigationController) {
-
- [self.navigationController popViewControllerAnimated:YES];
- [SVProgressHUD dismiss];
- [MBProgressHUD hideHUD];
-
- }else{
-
- [self dismissViewControllerAnimated:YES completion:nil];
-
- }
-
- }
- @end
|