1 Star 0 Fork 0

修罗/XLCodeLibrary

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
XLBaseViewController.m 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
十度 提交于 2017-12-11 08:37 . 添加
//
// XLBaseViewController.m
// YaJunWei
//
// Created by 十度 on 2017/11/14.
// Copyright © 2017年 十度. All rights reserved.
//
#import "XLBaseViewController.h"
@interface XLBaseViewController ()
@end
@implementation XLBaseViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
//设置样式
- (UIStatusBarStyle)preferredStatusBarStyle {
return UIStatusBarStyleDefault;
}
//设置是否隐藏
- (BOOL)prefersStatusBarHidden {
// [super prefersStatusBarHidden];
return NO;
}
//设置隐藏动画
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationNone;
}
/** 加载控制器
如果有xib就加载xib
没有就初始化
*/
- (UIViewController *)loadViewController:(NSString *)vcName
{
Class class = NSClassFromString(vcName);
UIViewController *vc;
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSString *path = [[NSBundle mainBundle] pathForResource:vcName ofType:@".nib"];
if ([fileMgr fileExistsAtPath:path]) {
vc = [[class alloc]initWithNibName:vcName bundle:[NSBundle mainBundle]];
}else{
vc = [[class alloc]init];
}
return vc;
}
@end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Objective-C
1
https://gitee.com/xiuluodaren/XLCodeLibrary.git
git@gitee.com:xiuluodaren/XLCodeLibrary.git
xiuluodaren
XLCodeLibrary
XLCodeLibrary
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385