123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // BaseViewController.m
- // XenonSDK
- //
- // Created by SAGESSE on 2019/5/29.
- // Copyright © 2019 SAGESSE. All rights reserved.
- //
- #import "XenonSDK.h"
- #import "BaseViewController.h"
- @interface BaseViewController ()
- @end
- @implementation BaseViewController
- - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- return [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil ?: XenonSDK.sharedSDK.bundle];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
-
- if (!self.prefersUnifiedBackground) {
- return;
- }
-
- self.view.backgroundColor = UIColor.clearColor;
- }
- - (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
-
- if (!self.prefersAutomaticBackView) {
- return;
- }
-
- if (self.navigationController.viewControllers.count == 1) {
- self.backView.hidden = YES;
- }
- }
- - (BOOL)prefersUnifiedBackground {
- return YES;
- }
- - (BOOL)prefersAutomaticBackView {
- return YES;
- }
- /*
- #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
|