Files
yinmeng-ios/xplan-ios/Base/UI/BaseViewController.m

76 lines
1.2 KiB
Objective-C

//
// BaseViewController.m
// xplan-ios
//
// Created by zu on 2021/8/31.
//
#import "BaseViewController.h"
///Tool
#import "XCHUDTool.h"
#import "ThemeColor.h"
@interface BaseViewController ()
@end
@implementation BaseViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self themeConfig];
}
- (void)themeConfig {
self.view.backgroundColor = [ThemeColor appBackgroundColor];
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
}
/**
隐藏导航条
*/
- (void)hideNavigationBar {
[self.navigationController setNavigationBarHidden:YES animated:YES];
}
/**
显示导航条
*/
- (void)showNavigationBar {
[self.navigationController setNavigationBarHidden:NO];
}
/**
显示状态栏
*/
- (void)showStatusBar {
[UIApplication sharedApplication].statusBarHidden = NO;
}
/**
隐藏状态栏
*/
- (void)hideStatusBar {
[UIApplication sharedApplication].statusBarHidden = YES;
}
- (void)showSuccessToast:(NSString *)msg {
[XCHUDTool showSuccessWithMessage:msg];
}
- (void)showErrorToast:(NSString *)msg {
[XCHUDTool showErrorWithMessage:msg];
}
- (void)showLoading {
[XCHUDTool showLoading];
}
- (void)hideHUD {
[XCHUDTool hideHUD];
}
@end