Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
1e8ca0fa
D
DoraemonKit
项目概览
DiDi
/
DoraemonKit
9 个月 前同步成功
通知
166
Star
19623
Fork
3062
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DoraemonKit
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1e8ca0fa
编写于
8月 10, 2020
作者:
J
jackjintai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/didi/DoraemonKit
上级
0e6e9029
d0a45a5c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
83 addition
and
16 deletion
+83
-16
iOS/DoraemonKit/Src/Core/Base/DoraemonStatusBarViewController.m
...raemonKit/Src/Core/Base/DoraemonStatusBarViewController.m
+17
-4
iOS/DoraemonKit/Src/Core/Entry/Entry/DoraemonEntryWindow.m
iOS/DoraemonKit/Src/Core/Entry/Entry/DoraemonEntryWindow.m
+6
-10
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonHomeWindow.m
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonHomeWindow.m
+2
-1
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonNavigationController.h
...monKit/Src/Core/Entry/Home/DoraemonNavigationController.h
+17
-0
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonNavigationController.m
...monKit/Src/Core/Entry/Home/DoraemonNavigationController.m
+37
-0
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.h
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.h
+3
-0
iOS/DoraemonKitDemo/Podfile.lock
iOS/DoraemonKitDemo/Podfile.lock
+1
-1
未找到文件。
iOS/DoraemonKit/Src/Core/Base/DoraemonStatusBarViewController.m
浏览文件 @
1e8ca0fa
...
...
@@ -6,6 +6,7 @@
//
#import "DoraemonStatusBarViewController.h"
#import "DoraemonManager.h"
@interface
DoraemonStatusBarViewController
()
...
...
@@ -17,14 +18,26 @@
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
}
-
(
BOOL
)
prefersStatusBarHidden
{
// iOS9.0的系统中,新建的window设置的rootViewController默认没有显示状态栏
#if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_9_3
-
(
BOOL
)
prefersStatusBarHidden
{
return
NO
;
}
-
(
UIStatusBarStyle
)
preferredStatusBarStyle
{
-
(
UIStatusBarStyle
)
preferredStatusBarStyle
{
return
UIStatusBarStyleDefault
;
}
#endif
-
(
UIInterfaceOrientationMask
)
supportedInterfaceOrientations
{
return
DoraemonManager
.
shareInstance
.
supportedInterfaceOrientations
;
}
/*
#pragma mark - Navigation
...
...
iOS/DoraemonKit/Src/Core/Entry/Entry/DoraemonEntryWindow.m
浏览文件 @
1e8ca0fa
...
...
@@ -88,17 +88,13 @@
self
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
windowLevel
=
UIWindowLevelStatusBar
+
100
.
f
;
self
.
layer
.
masksToBounds
=
YES
;
NSString
*
version
=
[
UIDevice
currentDevice
].
systemVersion
;
if
(
version
.
doubleValue
>=
10
.
0
)
{
if
(
!
self
.
rootViewController
)
{
self
.
rootViewController
=
[[
UIViewController
alloc
]
init
];
}
}
else
{
//iOS9.0的系统中,新建的window设置的rootViewController默认没有显示状态栏
if
(
!
self
.
rootViewController
)
{
self
.
rootViewController
=
[[
DoraemonStatusBarViewController
alloc
]
init
];
}
// 统一使用 DoraemonStatusBarViewController
// 对系统的版本处理放入 DoraemonStatusBarViewController 类中
if
(
!
self
.
rootViewController
)
{
self
.
rootViewController
=
[[
DoraemonStatusBarViewController
alloc
]
init
];
}
[
self
.
rootViewController
.
view
addSubview
:
self
.
entryBtn
];
UIPanGestureRecognizer
*
pan
=
[[
UIPanGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
pan
:
)];
...
...
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonHomeWindow.m
浏览文件 @
1e8ca0fa
...
...
@@ -9,6 +9,7 @@
#import "DoraemonDefine.h"
#import "UIColor+Doraemon.h"
#import "DoraemonHomeViewController.h"
#import "DoraemonNavigationController.h"
@interface
DoraemonHomeWindow
()
...
...
@@ -70,7 +71,7 @@
-
(
void
)
setRootVc
:(
UIViewController
*
)
rootVc
{
if
(
rootVc
)
{
UINavigationController
*
nav
=
[[
UI
NavigationController
alloc
]
initWithRootViewController
:
rootVc
];
DoraemonNavigationController
*
nav
=
[[
Doraemon
NavigationController
alloc
]
initWithRootViewController
:
rootVc
];
NSDictionary
*
attributesDic
=
@{
NSForegroundColorAttributeName:
[
UIColor
blackColor
],
NSFontAttributeName:
[
UIFont
systemFontOfSize
:
18
]
...
...
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonNavigationController.h
0 → 100644
浏览文件 @
1e8ca0fa
//
// DoraemonNavigationController.h
// DoraemonKit
//
// Created by Chunhui Sun on 2020/7/14.
// Copyright © 2020 YunXIao. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
DoraemonNavigationController
:
UINavigationController
@end
NS_ASSUME_NONNULL_END
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonNavigationController.m
0 → 100644
浏览文件 @
1e8ca0fa
//
// DoraemonNavigationController.m
// DoraemonKit
//
// Created by Chunhui Sun on 2020/7/14.
// Copyright © 2020 YunXIao. All rights reserved.
//
#import "DoraemonNavigationController.h"
#import "DoraemonManager.h"
@interface
DoraemonNavigationController
()
@end
@implementation
DoraemonNavigationController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
}
-
(
UIInterfaceOrientationMask
)
supportedInterfaceOrientations
{
return
DoraemonManager
.
shareInstance
.
supportedInterfaceOrientations
;
}
/*
#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
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.h
浏览文件 @
1e8ca0fa
...
...
@@ -162,5 +162,8 @@ typedef NS_ENUM(NSUInteger, DoraemonManagerPluginType) {
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
keyBlockDic
;
//保存key和block的关系
/// DoKit 支持的旋转方向
@property
(
assign
,
nonatomic
)
UIInterfaceOrientationMask
supportedInterfaceOrientations
;
@end
NS_ASSUME_NONNULL_END
iOS/DoraemonKitDemo/Podfile.lock
浏览文件 @
1e8ca0fa
...
...
@@ -132,4 +132,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 5f1dcd15ca63a6c44978b50f105166e29d3a9fd4
COCOAPODS: 1.9.
1
COCOAPODS: 1.9.
3
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录