Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
d7d2d154
D
DoraemonKit
项目概览
DiDi
/
DoraemonKit
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
d7d2d154
编写于
5月 01, 2019
作者:
H
Hugin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CPU FPS Memory NetFlow 4个检测控件横屏适配
上级
dc5b6a9f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
35 addition
and
26 deletion
+35
-26
iOS/DoraemonKit/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramView.m
...t/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramView.m
+6
-6
iOS/DoraemonKit/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramViewController.m
.../CommonUI/Oscillogram/DoraemonOscillogramViewController.m
+6
-3
iOS/DoraemonKit/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramWindow.m
...Src/Core/CommonUI/Oscillogram/DoraemonOscillogramWindow.m
+6
-1
iOS/DoraemonKit/Src/Core/Plugin/CPU/Function/DoraemonCPUOscillogramViewController.m
...lugin/CPU/Function/DoraemonCPUOscillogramViewController.m
+4
-4
iOS/DoraemonKit/Src/Core/Plugin/FPS/Function/DoraemonFPSOscillogramViewController.m
...lugin/FPS/Function/DoraemonFPSOscillogramViewController.m
+5
-4
iOS/DoraemonKit/Src/Core/Plugin/Memory/Function/DoraemonMemoryOscillogramViewController.m
...Memory/Function/DoraemonMemoryOscillogramViewController.m
+4
-4
iOS/DoraemonKit/Src/Core/Plugin/NetFlow/Function/View/DoraemonNetFlowOscillogramViewController.m
.../Function/View/DoraemonNetFlowOscillogramViewController.m
+4
-4
未找到文件。
iOS/DoraemonKit/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramView.m
浏览文件 @
d7d2d154
...
...
@@ -37,7 +37,7 @@
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
_kStartX
=
kDoraemonSizeFrom750
(
52
);
_kStartX
=
kDoraemonSizeFrom750
_Landscape
(
52
);
self
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
showsVerticalScrollIndicator
=
NO
;
...
...
@@ -50,18 +50,18 @@
_pointList
=
[
NSMutableArray
array
];
_pointLayerList
=
[
NSMutableArray
array
];
_bottomLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
_kStartX
,
self
.
doraemon_height
-
kDoraemonSizeFrom750
(
1
),
self
.
doraemon_width
,
kDoraemonSizeFrom750
(
1
))];
_bottomLine
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
_kStartX
,
self
.
doraemon_height
-
kDoraemonSizeFrom750
_Landscape
(
1
),
self
.
doraemon_width
,
kDoraemonSizeFrom750_Landscape
(
1
))];
_bottomLine
.
backgroundColor
=
[
UIColor
doraemon_colorWithString
:
@"#999999"
];
[
self
addSubview
:
_bottomLine
];
_lowValueLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
doraemon_height
-
kDoraemonSizeFrom750
(
28
)
/
2
,
_kStartX
,
kDoraemonSizeFrom750
(
28
))];
_lowValueLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
doraemon_height
-
kDoraemonSizeFrom750
_Landscape
(
28
)
/
2
,
_kStartX
,
kDoraemonSizeFrom750_Landscape
(
28
))];
_lowValueLabel
.
text
=
@"0"
;
_lowValueLabel
.
textColor
=
[
UIColor
whiteColor
];
_lowValueLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_lowValueLabel
.
font
=
[
UIFont
systemFontOfSize
:
10
];
[
self
addSubview
:
_lowValueLabel
];
_highValueLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
-
kDoraemonSizeFrom750
(
28
)
/
2
,
_kStartX
,
kDoraemonSizeFrom750
(
28
))];
_highValueLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
-
kDoraemonSizeFrom750
_Landscape
(
28
)
/
2
,
_kStartX
,
kDoraemonSizeFrom750_Landscape
(
28
))];
_highValueLabel
.
text
=
@"100"
;
_highValueLabel
.
textColor
=
[
UIColor
whiteColor
];
_highValueLabel
.
textAlignment
=
NSTextAlignmentCenter
;
...
...
@@ -71,7 +71,7 @@
_tipLabel
=
[[
UILabel
alloc
]
init
];
_tipLabel
.
textColor
=
[
UIColor
doraemon_colorWithString
:
@"#00DFDD"
];
_tipLabel
.
textAlignment
=
NSTextAlignmentCenter
;
_tipLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
20
)];
_tipLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
_Landscape
(
20
)];
_tipLabel
.
lineBreakMode
=
NSLineBreakByClipping
;
[
self
addSubview
:
_tipLabel
];
}
...
...
@@ -170,7 +170,7 @@
CALayer
*
pointLayer
=
[
CALayer
layer
];
pointLayer
.
backgroundColor
=
[
UIColor
doraemon_colorWithString
:
@"#00DFDD"
].
CGColor
;
pointLayer
.
cornerRadius
=
2
;
pointLayer
.
frame
=
CGRectMake
(
point
.
x
-
kDoraemonSizeFrom750
(
8
)
/
2
,
point
.
y
-
kDoraemonSizeFrom750
(
8
)
/
2
,
kDoraemonSizeFrom750
(
8
),
kDoraemonSizeFrom750
(
8
));
pointLayer
.
frame
=
CGRectMake
(
point
.
x
-
kDoraemonSizeFrom750
_Landscape
(
8
)
/
2
,
point
.
y
-
kDoraemonSizeFrom750_Landscape
(
8
)
/
2
,
kDoraemonSizeFrom750_Landscape
(
8
),
kDoraemonSizeFrom750_Landscape
(
8
));
[
_pointLayerList
addObject
:
pointLayer
];
}
...
...
iOS/DoraemonKit/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramViewController.m
浏览文件 @
d7d2d154
...
...
@@ -13,7 +13,10 @@
@end
@implementation
DoraemonOscillogramViewController
-
(
void
)
viewWillTransitionToSize
:(
CGSize
)
size
withTransitionCoordinator
:(
id
<
UIViewControllerTransitionCoordinator
>
)
coordinator
{
[
super
viewWillTransitionToSize
:
size
withTransitionCoordinator
:
coordinator
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
self
.
view
.
window
.
frame
=
CGRectMake
(
0
,
0
,
size
.
height
,
size
.
width
);
});
}
@end
iOS/DoraemonKit/Src/Core/CommonUI/Oscillogram/DoraemonOscillogramWindow.m
浏览文件 @
d7d2d154
...
...
@@ -30,6 +30,7 @@
if
(
self
)
{
self
.
windowLevel
=
UIWindowLevelStatusBar
+
1
.
f
;
self
.
backgroundColor
=
[
UIColor
doraemon_colorWithHex
:
0x000000
andAlpha
:
0
.
33
];
self
.
layer
.
masksToBounds
=
YES
;
[
self
addRootVc
];
}
...
...
@@ -54,7 +55,11 @@
-
(
void
)
show
{
self
.
hidden
=
NO
;
self
.
frame
=
CGRectMake
(
0
,
0
,
DoraemonScreenWidth
,
kDoraemonSizeFrom750
(
480
)
+
IPHONE_TOPSENSOR_HEIGHT
);
if
(
kInterfaceOrientationPortrait
)
{
self
.
frame
=
CGRectMake
(
0
,
0
,
DoraemonScreenWidth
,
kDoraemonSizeFrom750
(
480
)
+
IPHONE_TOPSENSOR_HEIGHT
);
}
else
{
self
.
frame
=
CGRectMake
(
0
,
0
,
DoraemonScreenHeight
,
kDoraemonSizeFrom750_Landscape
(
480
)
+
IPHONE_TOPSENSOR_HEIGHT
);
}
[
_vc
startRecord
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/CPU/Function/DoraemonCPUOscillogramViewController.m
浏览文件 @
d7d2d154
...
...
@@ -32,19 +32,19 @@
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
init
];
titleLabel
.
backgroundColor
=
[
UIColor
clearColor
];
titleLabel
.
text
=
DoraemonLocalizedString
(
@"CPU检测"
);
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
20
)];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
_Landscape
(
20
)];
titleLabel
.
textColor
=
[
UIColor
whiteColor
];
[
self
.
view
addSubview
:
titleLabel
];
[
titleLabel
sizeToFit
];
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
_Landscape
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750_Landscape
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
UIButton
*
closeBtn
=
[[
UIButton
alloc
]
init
];
[
closeBtn
setImage
:[
UIImage
doraemon_imageNamed
:
@"doraemon_close_white"
]
forState
:
UIControlStateNormal
];
closeBtn
.
frame
=
CGRectMake
(
self
.
view
.
doraemon_width
-
kDoraemonSizeFrom750
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750
(
60
),
kDoraemonSizeFrom750
(
60
));
closeBtn
.
frame
=
CGRectMake
(
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
)
-
kDoraemonSizeFrom750_Landscape
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750_Landscape
(
60
),
kDoraemonSizeFrom750_Landscape
(
60
));
[
closeBtn
addTarget
:
self
action
:
@selector
(
closeBtnClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
closeBtn
];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
(
24
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
400
))];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
_Landscape
(
24
),
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
),
kDoraemonSizeFrom750_Landscape
(
400
))];
_oscillogramView
.
backgroundColor
=
[
UIColor
clearColor
];
[
_oscillogramView
setLowValue
:
@"0"
];
[
_oscillogramView
setHightValue
:
@"100"
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/FPS/Function/DoraemonFPSOscillogramViewController.m
浏览文件 @
d7d2d154
...
...
@@ -32,19 +32,20 @@
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
init
];
titleLabel
.
backgroundColor
=
[
UIColor
clearColor
];
titleLabel
.
text
=
DoraemonLocalizedString
(
@"帧率检测"
);
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
20
)];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
_Landscape
(
20
)];
titleLabel
.
textColor
=
[
UIColor
whiteColor
];
[
self
.
view
addSubview
:
titleLabel
];
[
titleLabel
sizeToFit
];
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
_Landscape
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750_Landscape
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
UIButton
*
closeBtn
=
[[
UIButton
alloc
]
init
];
[
closeBtn
setImage
:[
UIImage
doraemon_imageNamed
:
@"doraemon_close_white"
]
forState
:
UIControlStateNormal
];
closeBtn
.
frame
=
CGRectMake
(
self
.
view
.
doraemon_width
-
kDoraemonSizeFrom750
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750
(
60
),
kDoraemonSizeFrom750
(
60
));
closeBtn
.
frame
=
CGRectMake
((
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
)
-
kDoraemonSizeFrom750_Landscape
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750_Landscape
(
60
),
kDoraemonSizeFrom750_Landscape
(
60
));
[
closeBtn
addTarget
:
self
action
:
@selector
(
closeBtnClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
closeBtn
];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
(
24
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
400
))];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
_Landscape
(
24
),
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
),
kDoraemonSizeFrom750_Landscape
(
400
))];
_oscillogramView
.
backgroundColor
=
[
UIColor
clearColor
];
[
_oscillogramView
setLowValue
:
@"0"
];
[
_oscillogramView
setHightValue
:
@"60"
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Memory/Function/DoraemonMemoryOscillogramViewController.m
浏览文件 @
d7d2d154
...
...
@@ -32,19 +32,19 @@
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
init
];
titleLabel
.
backgroundColor
=
[
UIColor
clearColor
];
titleLabel
.
text
=
DoraemonLocalizedString
(
@"内存检测"
);
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
20
)];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
_Landscape
(
20
)];
titleLabel
.
textColor
=
[
UIColor
whiteColor
];
[
self
.
view
addSubview
:
titleLabel
];
[
titleLabel
sizeToFit
];
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
_Landscape
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750_Landscape
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
UIButton
*
closeBtn
=
[[
UIButton
alloc
]
init
];
[
closeBtn
setImage
:[
UIImage
doraemon_imageNamed
:
@"doraemon_close_white"
]
forState
:
UIControlStateNormal
];
closeBtn
.
frame
=
CGRectMake
(
self
.
view
.
doraemon_width
-
kDoraemonSizeFrom750
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750
(
60
),
kDoraemonSizeFrom750
(
60
));
closeBtn
.
frame
=
CGRectMake
(
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
)
-
kDoraemonSizeFrom750_Landscape
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750_Landscape
(
60
),
kDoraemonSizeFrom750_Landscape
(
60
));
[
closeBtn
addTarget
:
self
action
:
@selector
(
closeBtnClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
closeBtn
];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
(
24
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
400
))];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
_Landscape
(
24
),
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
),
kDoraemonSizeFrom750_Landscape
(
400
))];
_oscillogramView
.
backgroundColor
=
[
UIColor
clearColor
];
[
_oscillogramView
setLowValue
:
@"0"
];
[
_oscillogramView
setHightValue
:[
NSString
stringWithFormat
:
@"%zi"
,[
self
deviceMemory
]]];
...
...
iOS/DoraemonKit/Src/Core/Plugin/NetFlow/Function/View/DoraemonNetFlowOscillogramViewController.m
浏览文件 @
d7d2d154
...
...
@@ -31,19 +31,19 @@
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
init
];
titleLabel
.
backgroundColor
=
[
UIColor
clearColor
];
titleLabel
.
text
=
DoraemonLocalizedString
(
@"流量检测"
);
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
20
)];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
_Landscape
(
20
)];
titleLabel
.
textColor
=
[
UIColor
whiteColor
];
[
self
.
view
addSubview
:
titleLabel
];
[
titleLabel
sizeToFit
];
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
_Landscape
(
20
),
IPHONE_TOPSENSOR_HEIGHT
+
kDoraemonSizeFrom750_Landscape
(
10
),
titleLabel
.
doraemon_width
,
titleLabel
.
doraemon_height
);
UIButton
*
closeBtn
=
[[
UIButton
alloc
]
init
];
[
closeBtn
setImage
:[
UIImage
doraemon_imageNamed
:
@"doraemon_close_white"
]
forState
:
UIControlStateNormal
];
closeBtn
.
frame
=
CGRectMake
(
self
.
view
.
doraemon_width
-
kDoraemonSizeFrom750
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750
(
60
),
kDoraemonSizeFrom750
(
60
));
closeBtn
.
frame
=
CGRectMake
(
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
)
-
kDoraemonSizeFrom750_Landscape
(
60
),
IPHONE_TOPSENSOR_HEIGHT
,
kDoraemonSizeFrom750_Landscape
(
60
),
kDoraemonSizeFrom750_Landscape
(
60
));
[
closeBtn
addTarget
:
self
action
:
@selector
(
closeBtnClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
closeBtn
];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
(
24
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
400
))];
_oscillogramView
=
[[
DoraemonOscillogramView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
titleLabel
.
doraemon_bottom
+
kDoraemonSizeFrom750
_Landscape
(
24
),
(
kInterfaceOrientationPortrait
?
DoraemonScreenWidth
:
DoraemonScreenHeight
),
kDoraemonSizeFrom750_Landscape
(
400
))];
_oscillogramView
.
backgroundColor
=
[
UIColor
clearColor
];
[
_oscillogramView
setLowValue
:
@"0"
];
[
_oscillogramView
setHightValue
:[
NSString
stringWithFormat
:
@"%zi"
,[
self
highestNetFlow
]]];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录