Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
f5d384a0
D
DoraemonKit
项目概览
DiDi
/
DoraemonKit
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
f5d384a0
编写于
5月 13, 2019
作者:
X
xieguobiyi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
多语言文案更新
上级
3f0f777e
变更
38
展开全部
隐藏空白更改
内联
并排
Showing
38 changed file
with
602 addition
and
450 deletion
+602
-450
iOS/DoraemonKit/Resource/en.lproj/Doraemon.strings
iOS/DoraemonKit/Resource/en.lproj/Doraemon.strings
+232
-147
iOS/DoraemonKit/Resource/zh-Hans.lproj/Doraemon.strings
iOS/DoraemonKit/Resource/zh-Hans.lproj/Doraemon.strings
+227
-142
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonHomeViewController.m
...aemonKit/Src/Core/Entry/Home/DoraemonHomeViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
+54
-54
iOS/DoraemonKit/Src/Core/Plugin/AllTest/DoraemonAllTestViewController.m
...t/Src/Core/Plugin/AllTest/DoraemonAllTestViewController.m
+4
-4
iOS/DoraemonKit/Src/Core/Plugin/AppInfo/DoraemonAppInfoCell.m
...DoraemonKit/Src/Core/Plugin/AppInfo/DoraemonAppInfoCell.m
+4
-4
iOS/DoraemonKit/Src/Core/Plugin/CPU/List/DoraemonCPUListViewController.m
.../Src/Core/Plugin/CPU/List/DoraemonCPUListViewController.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/DeleteLocalData/DoraemonDeleteLocalDataViewController.m
...n/DeleteLocalData/DoraemonDeleteLocalDataViewController.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/FPS/List/DoraemonFPSListViewController.m
.../Src/Core/Plugin/FPS/List/DoraemonFPSListViewController.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/H5/DoraemonDefaultWebViewController.m
...Kit/Src/Core/Plugin/H5/DoraemonDefaultWebViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/H5/DoraemonH5ViewController.m
...DoraemonKit/Src/Core/Plugin/H5/DoraemonH5ViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Memory/DoraemonMemoryViewController.m
...Kit/Src/Core/Plugin/Memory/DoraemonMemoryViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Memory/List/DoraemonMemoryListViewController.m
...ore/Plugin/Memory/List/DoraemonMemoryListViewController.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogListCell.m
...monKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogListCell.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogListViewController.m
.../Core/Plugin/NSLog/List/DoraemonNSLogListViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogSearchView.m
...nKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogSearchView.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/NetFlow/Detail/DoraemonNetFlowDetailSegment.m
...Core/Plugin/NetFlow/Detail/DoraemonNetFlowDetailSegment.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/NetFlow/TestList/DoraemonNetFlowTestListViewController.m
.../NetFlow/TestList/DoraemonNetFlowTestListViewController.m
+2
-2
iOS/DoraemonKit/Src/Core/Plugin/ViewAlign/Function/DoraemonViewAlignView.m
...rc/Core/Plugin/ViewAlign/Function/DoraemonViewAlignView.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/ViewCheck/Function/DoraemonViewCheckView.m
...rc/Core/Plugin/ViewCheck/Function/DoraemonViewCheckView.m
+1
-1
iOS/DoraemonKit/Src/Core/Util/Doraemoni18NUtil.m
iOS/DoraemonKit/Src/Core/Util/Doraemoni18NUtil.m
+3
-24
iOS/DoraemonKit/Src/GPS/DoraemonGPSViewController.m
iOS/DoraemonKit/Src/GPS/DoraemonGPSViewController.m
+1
-1
iOS/DoraemonKit/Src/GPS/View/DoraemonMockGPSInputView.m
iOS/DoraemonKit/Src/GPS/View/DoraemonMockGPSInputView.m
+2
-2
iOS/DoraemonKit/Src/GPS/View/DoraemonMockGPSOperateView.m
iOS/DoraemonKit/Src/GPS/View/DoraemonMockGPSOperateView.m
+1
-1
iOS/DoraemonKit/Src/Logger/List/DoraemonCocoaLumberjackListCell.m
...emonKit/Src/Logger/List/DoraemonCocoaLumberjackListCell.m
+2
-2
iOS/DoraemonKit/Src/Logger/List/DoraemonCocoaLumberjackListViewController.m
...c/Logger/List/DoraemonCocoaLumberjackListViewController.m
+1
-1
iOS/DoraemonKitDemo/DoraemonKitDemo/AppDelegate.m
iOS/DoraemonKitDemo/DoraemonKitDemo/AppDelegate.m
+2
-1
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Common/DoraemonDemoCommonViewController.m
...nKitDemo/DemoVC/Common/DoraemonDemoCommonViewController.m
+2
-2
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Crash/DoraemonDemoCrashViewController.m
...monKitDemo/DemoVC/Crash/DoraemonDemoCrashViewController.m
+1
-1
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Home/DoraemonDemoHomeViewController.m
...aemonKitDemo/DemoVC/Home/DoraemonDemoHomeViewController.m
+10
-9
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Logger/DoraemonDemoLoggerViewController.m
...nKitDemo/DemoVC/Logger/DoraemonDemoLoggerViewController.m
+3
-3
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/MockGPS/DoraemonDemoMockGPSViewController.m
...itDemo/DemoVC/MockGPS/DoraemonDemoMockGPSViewController.m
+1
-1
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Net/DoraemonDemoNetViewController.m
...oraemonKitDemo/DemoVC/Net/DoraemonDemoNetViewController.m
+7
-7
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Net/WebView/DoraemonUIWebViewViewController.m
...Demo/DemoVC/Net/WebView/DoraemonUIWebViewViewController.m
+2
-1
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Net/WebView/DoraemonWKWebViewViewController.m
...Demo/DemoVC/Net/WebView/DoraemonWKWebViewViewController.m
+2
-2
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Performance/DoraemonDemoPerformanceViewController.m
...emoVC/Performance/DoraemonDemoPerformanceViewController.m
+10
-10
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Sanbox/DoraemonDemoSanboxViewController.m
...nKitDemo/DemoVC/Sanbox/DoraemonDemoSanboxViewController.m
+7
-7
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/UI/DoraemonDemoUIViewController.m
.../DoraemonKitDemo/DemoVC/UI/DoraemonDemoUIViewController.m
+2
-2
未找到文件。
iOS/DoraemonKit/Resource/en.lproj/Doraemon.strings
浏览文件 @
f5d384a0
此差异已折叠。
点击以展开。
iOS/DoraemonKit/Resource/zh-Hans.lproj/Doraemon.strings
浏览文件 @
f5d384a0
此差异已折叠。
点击以展开。
iOS/DoraemonKit/Src/Core/Entry/Home/DoraemonHomeViewController.m
浏览文件 @
f5d384a0
...
...
@@ -63,7 +63,7 @@
UIButton
*
closeBtn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
kDoraemonSizeFrom750
(
30
),
offsetY
,
self
.
view
.
doraemon_width
-
2
*
kDoraemonSizeFrom750
(
30
),
kDoraemonSizeFrom750
(
100
))];
closeBtn
.
tag
=
scrollViewTagStartSubscript
+
_dataArray
.
count
;
closeBtn
.
backgroundColor
=
[
UIColor
whiteColor
];
[
closeBtn
setTitle
:
@"关闭DoraemonKit"
forState
:
UIControlStateNormal
];
[
closeBtn
setTitle
:
DoraemonLocalizedString
(
@"关闭DoraemonKit"
)
forState
:
UIControlStateNormal
];
[
closeBtn
setTitleColor
:[
UIColor
doraemon_colorWithString
:
@"#CC3A4B"
]
forState
:
UIControlStateNormal
];
[
closeBtn
addTarget
:
self
action
:
@selector
(
close
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
_scrollView
addSubview
:
closeBtn
];
...
...
iOS/DoraemonKit/Src/Core/Manager/DoraemonManager.m
浏览文件 @
f5d384a0
...
...
@@ -318,148 +318,148 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
NSArray
*
dataArray
=
@{
// 常用工具
@
(
DoraemonManagerPluginType_DoraemonAppInfoPlugin
)
:
@[
@{
kTitle
:
@"App信息"
},
@{
kDesc
:
@"App的一些基本信息"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"App信息"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"App的一些基本信息"
)
},
@{
kIcon
:
@"doraemon_app_info"
},
@{
kPluginName
:
@"DoraemonAppInfoPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonSandboxPlugin
)
:
@[
@{
kTitle
:
@"沙盒浏览"
},
@{
kDesc
:
@"沙盒浏览"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"沙盒浏览"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"沙盒浏览"
)
},
@{
kIcon
:
@"doraemon_file"
},
@{
kPluginName
:
@"DoraemonSandboxPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonGPSPlugin
)
:
@[
@{
kTitle
:
@"MockGPS"
},
@{
kDesc
:
@"MockGPS"
},
@{
kIcon
:
@"doraemon_mock_gps"
},
@{
kPluginName
:
@"DoraemonGPSPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonH5Plugin
)
:
@[
@{
kTitle
:
@"H5任意门"
},
@{
kDesc
:
@"H5通用跳转"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"H5任意门"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"H5通用跳转"
)
},
@{
kIcon
:
@"doraemon_h5"
},
@{
kPluginName
:
@"DoraemonH5Plugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonCrashPlugin
)
:
@[
@{
kTitle
:
@"Crash查看"
},
@{
kDesc
:
@"Crash本地查看"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"Crash查看"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"Crash本地查看"
)
},
@{
kIcon
:
@"doraemon_crash"
},
@{
kPluginName
:
@"DoraemonCrashPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonSubThreadUICheckPlugin
)
:
@[
@{
kTitle
:
@"子线程UI"
},
@{
kDesc
:
@"非主线程UI渲染检查"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"子线程UI"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"非主线程UI渲染检查"
)
},
@{
kIcon
:
@"doraemon_ui"
},
@{
kPluginName
:
@"DoraemonSubThreadUICheckPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonDeleteLocalDataPlugin
)
:
@[
@{
kTitle
:
@"清除本地数据"
},
@{
kDesc
:
@"清除本地数据"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"清除本地数据"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"清除本地数据"
)
},
@{
kIcon
:
@"doraemon_qingchu"
},
@{
kPluginName
:
@"DoraemonDeleteLocalDataPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonNSLogPlugin
)
:
@[
@{
kTitle
:
@"NSLog"
},
@{
kDesc
:
@"NSLog"
},
@{
kIcon
:
@"doraemon_nslog"
},
@{
kPluginName
:
@"DoraemonNSLogPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonCocoaLumberjackPlugin
)
:
@[
@{
kTitle
:
@"Lumberjack"
},
@{
kDesc
:
@"日志显示"
},
@{
kDesc
:
DoraemonLocalizedString
(
@"日志显示"
)
},
@{
kIcon
:
@"doraemon_log"
},
@{
kPluginName
:
@"DoraemonCocoaLumberjackPlugin"
},
@{
kAtModule
:
@"常用工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"常用工具"
)
}
],
// 性能检测
@
(
DoraemonManagerPluginType_DoraemonFPSPlugin
)
:
@[
@{
kTitle
:
@"帧率"
},
@{
kDesc
:
@"帧率监控"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"帧率"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"帧率监控"
)
},
@{
kIcon
:
@"doraemon_fps"
},
@{
kPluginName
:
@"DoraemonFPSPlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonCPUPlugin
)
:
@[
@{
kTitle
:
@"CPU"
},
@{
kDesc
:
@"CPU监控"
},
@{
kDesc
:
DoraemonLocalizedString
(
@"CPU监控"
)
},
@{
kIcon
:
@"doraemon_cpu"
},
@{
kPluginName
:
@"DoraemonCPUPlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonMemoryPlugin
)
:
@[
@{
kTitle
:
@"内存"
},
@{
kDesc
:
@"内存监控"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"内存"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"内存监控"
)
},
@{
kIcon
:
@"doraemon_memory"
},
@{
kPluginName
:
@"DoraemonMemoryPlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonNetFlowPlugin
)
:
@[
@{
kTitle
:
@"流量"
},
@{
kDesc
:
@"流量监控"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"流量"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"流量监控"
)
},
@{
kIcon
:
@"doraemon_net"
},
@{
kPluginName
:
@"DoraemonNetFlowPlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonANRPlugin
)
:
@[
@{
kTitle
:
@"卡顿"
},
@{
kDesc
:
@"卡顿监控"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"卡顿"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"卡顿监控"
)
},
@{
kIcon
:
@"doraemon_kadun"
},
@{
kPluginName
:
@"DoraemonANRPlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonAllTestPlugin
)
:
@[
@{
kTitle
:
@"自定义"
},
@{
kDesc
:
@"性能数据保存到本地"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"自定义"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"性能数据保存到本地"
)
},
@{
kIcon
:
@"doraemon_default"
},
@{
kPluginName
:
@"DoraemonAllTestPlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonMethodUseTimePlugin
)
:
@[
@{
kTitle
:
@"Load耗时"
},
@{
kDesc
:
@"Load方法消耗时间"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"Load耗时"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"Load方法消耗时间"
)
},
@{
kIcon
:
@"doraemon_method_use_time"
},
@{
kPluginName
:
@"DoraemonMethodUseTimePlugin"
},
@{
kAtModule
:
@"性能检测"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"性能检测"
)
}
],
// 视觉工具
@
(
DoraemonManagerPluginType_DoraemonColorPickPlugin
)
:
@[
@{
kTitle
:
@"颜色吸管"
},
@{
kDesc
:
@"颜色拾取器"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"颜色吸管"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"颜色拾取器"
)
},
@{
kIcon
:
@"doraemon_straw"
},
@{
kPluginName
:
@"DoraemonColorPickPlugin"
},
@{
kAtModule
:
@"视觉工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"视觉工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonViewCheckPlugin
)
:
@[
@{
kTitle
:
@"组件检查"
},
@{
kDesc
:
@"View查看器"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"组件检查"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"View查看器"
)
},
@{
kIcon
:
@"doraemon_view_check"
},
@{
kPluginName
:
@"DoraemonViewCheckPlugin"
},
@{
kAtModule
:
@"视觉工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"视觉工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonViewAlignPlugin
)
:
@[
@{
kTitle
:
@"对齐标尺"
},
@{
kDesc
:
@"查看组件是否对齐"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"对齐标尺"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"查看组件是否对齐"
)
},
@{
kIcon
:
@"doraemon_align"
},
@{
kPluginName
:
@"DoraemonViewAlignPlugin"
},
@{
kAtModule
:
@"视觉工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"视觉工具"
)
}
],
@
(
DoraemonManagerPluginType_DoraemonViewMetricsPlugin
)
:
@[
@{
kTitle
:
@"元素边框线"
},
@{
kDesc
:
@"显示元素边框线"
},
@{
kTitle
:
DoraemonLocalizedString
(
@"元素边框线"
)
},
@{
kDesc
:
DoraemonLocalizedString
(
@"显示元素边框线"
)
},
@{
kIcon
:
@"doraemon_viewmetrics"
},
@{
kPluginName
:
@"DoraemonViewMetricsPlugin"
},
@{
kAtModule
:
@"视觉工具"
}
@{
kAtModule
:
DoraemonLocalizedString
(
@"视觉工具"
)
}
]
}[
@
(
pluginType
)];
...
...
iOS/DoraemonKit/Src/Core/Plugin/AllTest/DoraemonAllTestViewController.m
浏览文件 @
f5d384a0
...
...
@@ -31,10 +31,10 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"自定义测试"
;
self
.
title
=
DoraemonLocalizedString
(
@"自定义测试"
)
;
_fpsSwitchView
=
[[
DoraemonCellSwitch
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
bigTitleView
.
doraemon_bottom
,
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
104
))];
[
_fpsSwitchView
renderUIWithTitle
:
@"帧率"
switchOn
:[
DoraemonAllTestManager
shareInstance
].
fpsSwitchOn
];
[
_fpsSwitchView
renderUIWithTitle
:
DoraemonLocalizedString
(
@"帧率"
)
switchOn
:[
DoraemonAllTestManager
shareInstance
].
fpsSwitchOn
];
[
_fpsSwitchView
.
switchView
addTarget
:
self
action
:
@selector
(
switchAction
:
)
forControlEvents
:
UIControlEventValueChanged
];
[
self
.
view
addSubview
:
_fpsSwitchView
];
...
...
@@ -44,12 +44,12 @@
[
self
.
view
addSubview
:
_cpuSwitchView
];
_memorySwitchView
=
[[
DoraemonCellSwitch
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
cpuSwitchView
.
doraemon_bottom
,
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
104
))];
[
_memorySwitchView
renderUIWithTitle
:
@"内存"
switchOn
:[
DoraemonAllTestManager
shareInstance
].
memorySwitchOn
];
[
_memorySwitchView
renderUIWithTitle
:
DoraemonLocalizedString
(
@"内存"
)
switchOn
:[
DoraemonAllTestManager
shareInstance
].
memorySwitchOn
];
[
_memorySwitchView
.
switchView
addTarget
:
self
action
:
@selector
(
switchAction
:
)
forControlEvents
:
UIControlEventValueChanged
];
[
self
.
view
addSubview
:
_memorySwitchView
];
_flowSwitchView
=
[[
DoraemonCellSwitch
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
memorySwitchView
.
doraemon_bottom
,
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
104
))];
[
_flowSwitchView
renderUIWithTitle
:
@"流量"
switchOn
:[
DoraemonAllTestManager
shareInstance
].
flowSwitchOn
];
[
_flowSwitchView
renderUIWithTitle
:
DoraemonLocalizedString
(
@"流量"
)
switchOn
:[
DoraemonAllTestManager
shareInstance
].
flowSwitchOn
];
[
_flowSwitchView
.
switchView
addTarget
:
self
action
:
@selector
(
switchAction
:
)
forControlEvents
:
UIControlEventValueChanged
];
[
self
.
view
addSubview
:
_flowSwitchView
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/AppInfo/DoraemonAppInfoCell.m
浏览文件 @
f5d384a0
...
...
@@ -45,13 +45,13 @@
NSString
*
cnValue
=
nil
;
if
([
value
isEqualToString
:
@"NotDetermined"
]){
cnValue
=
@"用户没有选择"
;
cnValue
=
DoraemonLocalizedString
(
@"用户没有选择"
)
;
}
else
if
([
value
isEqualToString
:
@"Restricted"
]){
cnValue
=
@"家长控制"
;
cnValue
=
DoraemonLocalizedString
(
@"家长控制"
)
;
}
else
if
([
value
isEqualToString
:
@"Denied"
]){
cnValue
=
@"用户没有授权"
;
cnValue
=
DoraemonLocalizedString
(
@"用户没有授权"
)
;
}
else
if
([
value
isEqualToString
:
@"Authorized"
]){
cnValue
=
@"用户已经授权"
;
cnValue
=
DoraemonLocalizedString
(
@"用户已经授权"
)
;
}
else
{
cnValue
=
value
;
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/CPU/List/DoraemonCPUListViewController.m
浏览文件 @
f5d384a0
...
...
@@ -16,12 +16,12 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"检测记录"
;
self
.
title
=
DoraemonLocalizedString
(
@"检测记录"
)
;
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
+
kDoraemonSizeFrom750
(
40
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
40
))];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
titleLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
titleLabel
.
text
=
@"正在开发中,敬请期待"
;
titleLabel
.
text
=
DoraemonLocalizedString
(
@"正在开发中,敬请期待"
)
;
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
view
addSubview
:
titleLabel
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/DeleteLocalData/DoraemonDeleteLocalDataViewController.m
浏览文件 @
f5d384a0
...
...
@@ -24,7 +24,7 @@
self
.
title
=
DoraemonLocalizedString
(
@"清除本地数据"
);
_cellBtn
=
[[
DoraemonCellButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
bigTitleView
.
doraemon_bottom
,
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
104
))];
[
_cellBtn
renderUIWithTitle
:
@"清除本地数据"
];
[
_cellBtn
renderUIWithTitle
:
DoraemonLocalizedString
(
@"清除本地数据"
)
];
[
_cellBtn
renderUIWithRightContent
:[
self
getHomeDirFileSize
]];
_cellBtn
.
delegate
=
self
;
[
_cellBtn
needDownLine
];
...
...
@@ -45,7 +45,7 @@
UIAlertController
*
alertController
=
[
UIAlertController
alertControllerWithTitle
:
DoraemonLocalizedString
(
@"提示"
)
message
:
DoraemonLocalizedString
(
@"确定要删除本地数据"
)
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertAction
*
cancelAction
=
[
UIAlertAction
actionWithTitle
:
DoraemonLocalizedString
(
@"取消"
)
style
:
UIAlertActionStyleCancel
handler
:
nil
];
UIAlertAction
*
okAction
=
[
UIAlertAction
actionWithTitle
:
DoraemonLocalizedString
(
@"确定"
)
style
:
UIAlertActionStyleDefault
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
.
cellBtn
renderUIWithRightContent
:
@"正在清理中"
];
[
weakSelf
.
cellBtn
renderUIWithRightContent
:
DoraemonLocalizedString
(
@"正在清理中"
)
];
[
DoraemonUtil
clearLocalDatas
];
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
0
.
5
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
weakSelf
.
cellBtn
renderUIWithRightContent
:[
self
getHomeDirFileSize
]];
...
...
iOS/DoraemonKit/Src/Core/Plugin/FPS/List/DoraemonFPSListViewController.m
浏览文件 @
f5d384a0
...
...
@@ -16,12 +16,12 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"检测记录"
;
self
.
title
=
DoraemonLocalizedString
(
@"检测记录"
)
;
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
+
kDoraemonSizeFrom750
(
40
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
40
))];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
titleLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
titleLabel
.
text
=
@"正在开发中,敬请期待"
;
titleLabel
.
text
=
DoraemonLocalizedString
(
@"正在开发中,敬请期待"
)
;
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
view
addSubview
:
titleLabel
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/H5/DoraemonDefaultWebViewController.m
浏览文件 @
f5d384a0
...
...
@@ -15,7 +15,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"Doraemon内置浏览器"
;
self
.
title
=
DoraemonLocalizedString
(
@"Doraemon内置浏览器"
)
;
UIWebView
*
view
=
[[
UIWebView
alloc
]
initWithFrame
:
self
.
view
.
frame
];
[
view
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
self
.
h5Url
]]];
[
self
.
view
addSubview
:
view
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/H5/DoraemonH5ViewController.m
浏览文件 @
f5d384a0
...
...
@@ -30,7 +30,7 @@
_h5UrlTextView
=
[[
UITextView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
bigTitleView
.
doraemon_bottom
,
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
358
))];
_h5UrlTextView
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
_h5UrlTextView
.
placeholder
=
@"请输入网址"
;
_h5UrlTextView
.
placeholder
=
DoraemonLocalizedString
(
@"请输入网址"
)
;
[
self
.
view
addSubview
:
_h5UrlTextView
];
_h5UrlTextView
.
keyboardType
=
UIKeyboardTypeURL
;
_h5UrlTextView
.
autocorrectionType
=
UITextAutocorrectionTypeNo
;
...
...
iOS/DoraemonKit/Src/Core/Plugin/Memory/DoraemonMemoryViewController.m
浏览文件 @
f5d384a0
...
...
@@ -25,7 +25,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"内存检测"
;
self
.
title
=
DoraemonLocalizedString
(
@"内存检测"
)
;
_switchView
=
[[
DoraemonCellSwitch
alloc
]
initWithFrame
:
CGRectMake
(
0
,
self
.
bigTitleView
.
doraemon_bottom
,
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
104
))];
[
_switchView
renderUIWithTitle
:
DoraemonLocalizedString
(
@"内存检测开关"
)
switchOn
:[[
DoraemonCacheManager
sharedInstance
]
memorySwitch
]];
...
...
iOS/DoraemonKit/Src/Core/Plugin/Memory/List/DoraemonMemoryListViewController.m
浏览文件 @
f5d384a0
...
...
@@ -16,12 +16,12 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"检测记录"
;
self
.
title
=
DoraemonLocalizedString
(
@"检测记录"
)
;
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
+
kDoraemonSizeFrom750
(
40
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
40
))];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
titleLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
titleLabel
.
text
=
@"正在开发中,敬请期待"
;
titleLabel
.
text
=
DoraemonLocalizedString
(
@"正在开发中,敬请期待"
)
;
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
view
addSubview
:
titleLabel
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogListCell.m
浏览文件 @
f5d384a0
...
...
@@ -42,7 +42,7 @@
NSString
*
log
=
model
.
content
;
NSTimeInterval
timeInterval
=
model
.
timeInterval
;
NSString
*
time
=
[
DoraemonUtil
dateFormatTimeInterval
:
timeInterval
];
content
=
[
NSString
stringWithFormat
:
@"%@
\n
触发时间: %@"
,
log
,
time
];
content
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"%@
\n
触发时间: %@"
)
,
log
,
time
];
_logLabel
.
numberOfLines
=
0
;
_logLabel
.
text
=
content
;
CGSize
size
=
[
_logLabel
sizeThatFits
:
CGSizeMake
(
DoraemonScreenWidth
-
kDoraemonSizeFrom750
(
32
)
*
2
-
kDoraemonSizeFrom750
(
25
)
-
kDoraemonSizeFrom750
(
12
)
*
2
,
MAXFLOAT
)];
...
...
@@ -66,7 +66,7 @@
NSString
*
log
=
model
.
content
;
NSTimeInterval
timeInterval
=
model
.
timeInterval
;
NSString
*
time
=
[
DoraemonUtil
dateFormatTimeInterval
:
timeInterval
];
NSString
*
content
=
[
NSString
stringWithFormat
:
@"%@
\n
触发时间: %@"
,
log
,
time
];
NSString
*
content
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"%@
\n
触发时间: %@"
)
,
log
,
time
];
UILabel
*
logLabel
=
[[
UILabel
alloc
]
init
];
logLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogListViewController.m
浏览文件 @
f5d384a0
...
...
@@ -25,7 +25,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"NSLog日志记录"
;
self
.
title
=
DoraemonLocalizedString
(
@"NSLog日志记录"
)
;
//按照时间倒序排列
self
.
dataArray
=
[[[
DoraemonNSLogManager
sharedInstance
].
dataArray
reverseObjectEnumerator
]
allObjects
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/NSLog/List/DoraemonNSLogSearchView.m
浏览文件 @
f5d384a0
...
...
@@ -29,7 +29,7 @@
[
self
addSubview
:
_searchIcon
];
_textField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
_searchIcon
.
doraemon_right
+
kDoraemonSizeFrom750
(
20
),
self
.
doraemon_height
/
2
-
kDoraemonSizeFrom750
(
50
)
/
2
,
self
.
doraemon_width
-
_searchIcon
.
doraemon_right
-
kDoraemonSizeFrom750
(
20
),
kDoraemonSizeFrom750
(
50
))];
_textField
.
placeholder
=
@"请输入您要搜索的关键字"
;
_textField
.
placeholder
=
DoraemonLocalizedString
(
@"请输入您要搜索的关键字"
)
;
[
_textField
addTarget
:
self
action
:
@selector
(
textFieldDidChange
:
)
forControlEvents
:
UIControlEventEditingChanged
];
[
self
addSubview
:
_textField
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/NetFlow/Detail/DoraemonNetFlowDetailSegment.m
浏览文件 @
f5d384a0
...
...
@@ -25,7 +25,7 @@
_leftLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
self
.
doraemon_width
/
2
,
self
.
doraemon_height
)];
_leftLabel
.
textColor
=
[
UIColor
doraemon_colorWithHexString
:
@"337CC4"
];
_leftLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
_leftLabel
.
text
=
@"请求"
;
_leftLabel
.
text
=
DoraemonLocalizedString
(
@"请求"
)
;
_leftLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
addSubview
:
_leftLabel
];
...
...
@@ -36,7 +36,7 @@
_rightLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
self
.
doraemon_width
/
2
,
0
,
self
.
doraemon_width
/
2
,
self
.
doraemon_height
)];
_rightLabel
.
textColor
=
[
UIColor
doraemon_colorWithHexString
:
@"333333"
];
_rightLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
_rightLabel
.
text
=
@"响应"
;
_rightLabel
.
text
=
DoraemonLocalizedString
(
@"响应"
)
;
_rightLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
addSubview
:
_rightLabel
];
...
...
iOS/DoraemonKit/Src/Core/Plugin/NetFlow/TestList/DoraemonNetFlowTestListViewController.m
浏览文件 @
f5d384a0
...
...
@@ -16,12 +16,12 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"检测记录"
;
self
.
title
=
DoraemonLocalizedString
(
@"检测记录"
)
;
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
+
kDoraemonSizeFrom750
(
40
),
self
.
view
.
doraemon_width
,
kDoraemonSizeFrom750
(
40
))];
titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
titleLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
titleLabel
.
text
=
@"正在开发中,敬请期待"
;
titleLabel
.
text
=
DoraemonLocalizedString
(
@"正在开发中,敬请期待"
)
;
titleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
view
addSubview
:
titleLabel
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/ViewAlign/Function/DoraemonViewAlignView.m
浏览文件 @
f5d384a0
...
...
@@ -143,7 +143,7 @@ static CGFloat const kViewCheckSize = 62;
}
-
(
void
)
configInfoLblText
{
_infoWindow
.
infoText
=
[
NSString
stringWithFormat
:
@"位置:左%@ 右%@ 上%@ 下%@"
,
_leftLabel
.
text
,
_rightLabel
.
text
,
_topLabel
.
text
,
_bottomLabel
.
text
];
_infoWindow
.
infoText
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"位置:左%@ 右%@ 上%@ 下%@"
)
,
_leftLabel
.
text
,
_rightLabel
.
text
,
_topLabel
.
text
,
_bottomLabel
.
text
];
}
...
...
iOS/DoraemonKit/Src/Core/Plugin/ViewCheck/Function/DoraemonViewCheckView.m
浏览文件 @
f5d384a0
...
...
@@ -150,7 +150,7 @@ static CGFloat const kViewCheckSize = 62;
-
(
NSMutableAttributedString
*
)
viewInfo
:(
UIView
*
)
view
{
if
(
view
)
{
NSMutableString
*
showString
=
[[
NSMutableString
alloc
]
init
];
NSString
*
tempString
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"控件名称:%@
"
),
NSStringFromClass
([
view
class
])];
NSString
*
tempString
=
[
NSString
stringWithFormat
:
@"%@:%@"
,
DoraemonLocalizedString
(
@"控件名称
"
),
NSStringFromClass
([
view
class
])];
[
showString
appendString
:
tempString
];
tempString
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"
\n
控件位置:左%0.1lf 上%0.1lf 宽%0.1lf 高%0.1lf"
),
view
.
frame
.
origin
.
x
,
view
.
frame
.
origin
.
y
,
view
.
frame
.
size
.
width
,
view
.
frame
.
size
.
height
];
...
...
iOS/DoraemonKit/Src/Core/Util/Doraemoni18NUtil.m
浏览文件 @
f5d384a0
...
...
@@ -7,38 +7,17 @@
#import "Doraemoni18NUtil.h"
NSString
*
const
DoraemonlanguageZHCN
=
@"zh-CN"
;
/**< 中文(大陆) */
NSString
*
const
DoraemonlanguageZHHansCN
=
@"zh-Hans-CN"
;
/**< 中文(大陆)简体中文 */
NSString
*
const
DoraemonlanguageENUS
=
@"en-US"
;
/**< 英语(美国) */
NSString
*
const
DoraemonlanguageENCN
=
@"en-CN"
;
/**< 英语(美国) */
NSString
*
const
DoraemonlanguageZHHK
=
@"zh-HK"
;
/**< 中文(香港)*/
NSDictionary
*
DoraemonLanguageCode_ISO639CodeMap
()
{
NSDictionary
*
dict
=
@{
DoraemonlanguageZHCN
:
@"zh-Hans"
,
DoraemonlanguageZHHansCN
:
@"zh-Hans"
,
DoraemonlanguageZHHK
:
@"zh-Han"
,
DoraemonlanguageENUS
:
@"en"
,
DoraemonlanguageENCN
:
@"en"
};
return
dict
;
}
@implementation
Doraemoni18NUtil
+
(
NSString
*
)
localizedString
:(
NSString
*
)
key
{
return
key
;
//暂时不支持国际化
NSString
*
language
=
[[
NSLocale
preferredLanguages
]
firstObject
];
if
(
language
.
length
==
0
)
{
return
key
;
}
NSString
*
fileNamePrefix
=
DoraemonLanguageCode_ISO639CodeMap
()[
language
];
if
(
fileNamePrefix
.
length
==
0
)
{
if
([
language
hasPrefix
:
@"zh-"
])
{
fileNamePrefix
=
@"zh-Hans"
;
}
else
if
([
language
hasPrefix
:
@"en-"
])
{
fileNamePrefix
=
@"en"
;
}
NSString
*
fileNamePrefix
=
@"zh-Hans"
;
if
([
language
hasPrefix
:
@"en"
])
{
fileNamePrefix
=
@"en"
;
}
NSBundle
*
tmp
=
[
NSBundle
bundleWithPath
:[[[
NSBundle
mainBundle
]
resourcePath
]
stringByAppendingPathComponent
:[
NSString
stringWithFormat
:
@"%@.bundle/"
,
@"DoraemonKit"
]]];
NSString
*
path
=
[
tmp
pathForResource
:
fileNamePrefix
ofType
:
@"lproj"
];
...
...
iOS/DoraemonKit/Src/GPS/DoraemonGPSViewController.m
浏览文件 @
f5d384a0
...
...
@@ -137,7 +137,7 @@
CLLocation
*
loc
=
[[
CLLocation
alloc
]
initWithLatitude
:
coordinate
.
latitude
longitude
:
coordinate
.
longitude
];
[[
DoraemonGPSMocker
shareInstance
]
mockPoint
:
loc
];
}
else
{
[
DoraemonToastUtil
showToast
:
@"格式不正确"
];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"格式不正确"
)
];
return
;
}
...
...
iOS/DoraemonKit/Src/GPS/View/DoraemonMockGPSInputView.m
浏览文件 @
f5d384a0
...
...
@@ -27,7 +27,7 @@
self
.
layer
.
cornerRadius
=
kDoraemonSizeFrom750
(
8
);
_textField
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
kDoraemonSizeFrom750
(
32
),
kDoraemonSizeFrom750
(
40
),
self
.
doraemon_width
-
2
*
kDoraemonSizeFrom750
(
32
),
kDoraemonSizeFrom750
(
45
))];
_textField
.
placeholder
=
@"请输入经纬度"
;
_textField
.
placeholder
=
DoraemonLocalizedString
(
@"请输入经纬度"
)
;
[
_textField
addTarget
:
self
action
:
@selector
(
textFieldDidChange
:
)
forControlEvents
:
UIControlEventEditingChanged
];
[
self
addSubview
:
_textField
];
...
...
@@ -44,7 +44,7 @@
_exampleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
kDoraemonSizeFrom750
(
32
),
_lineView
.
doraemon_bottom
+
kDoraemonSizeFrom750
(
15
),
self
.
doraemon_width
-
kDoraemonSizeFrom750
(
32
),
kDoraemonSizeFrom750
(
33
))];
_exampleLabel
.
textColor
=
[
UIColor
doraemon_black_3
];
_exampleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
24
)];
_exampleLabel
.
text
=
@"(示例: 120.15 30.28)"
;
_exampleLabel
.
text
=
DoraemonLocalizedString
(
@"(示例: 120.15 30.28)"
)
;
[
self
addSubview
:
_exampleLabel
];
}
return
self
;
...
...
iOS/DoraemonKit/Src/GPS/View/DoraemonMockGPSOperateView.m
浏览文件 @
f5d384a0
...
...
@@ -25,7 +25,7 @@
_titleLabel
=
[[
UILabel
alloc
]
init
];
_titleLabel
.
font
=
[
UIFont
systemFontOfSize
:
kDoraemonSizeFrom750
(
32
)];
_titleLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
_titleLabel
.
text
=
@"打开Mock GPS"
;
_titleLabel
.
text
=
DoraemonLocalizedString
(
@"打开Mock GPS"
)
;
[
self
addSubview
:
_titleLabel
];
[
_titleLabel
sizeToFit
];
_titleLabel
.
frame
=
CGRectMake
(
kDoraemonSizeFrom750
(
32
),
self
.
doraemon_height
/
2
-
_titleLabel
.
doraemon_height
/
2
,
_titleLabel
.
doraemon_width
,
_titleLabel
.
doraemon_height
);
...
...
iOS/DoraemonKit/Src/Logger/List/DoraemonCocoaLumberjackListCell.m
浏览文件 @
f5d384a0
...
...
@@ -41,7 +41,7 @@
if
(
model
&&
model
.
expand
){
NSString
*
log
=
model
.
message
;
NSString
*
time
=
[
DoraemonUtil
dateFormatNSDate
:
model
.
timestamp
];
content
=
[
NSString
stringWithFormat
:
@"%@
\n
触发时间: %@
\n
文件名称: %@
\n
所在行: %zi
\n
线程id: %@
\n
线程名称: %@"
,
log
,
time
,
model
.
fileName
,
model
.
line
,
model
.
threadId
,
model
.
threadName
];
content
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"%@
\n
触发时间: %@
\n
文件名称: %@
\n
所在行: %zi
\n
线程id: %@
\n
线程名称: %@"
)
,
log
,
time
,
model
.
fileName
,
model
.
line
,
model
.
threadId
,
model
.
threadName
];
_logLabel
.
numberOfLines
=
0
;
_logLabel
.
text
=
content
;
CGSize
size
=
[
_logLabel
sizeThatFits
:
CGSizeMake
(
DoraemonScreenWidth
-
kDoraemonSizeFrom750
(
32
)
*
2
-
kDoraemonSizeFrom750
(
25
)
-
kDoraemonSizeFrom750
(
12
)
*
2
,
MAXFLOAT
)];
...
...
@@ -64,7 +64,7 @@
if
(
model
&&
model
.
expand
)
{
NSString
*
log
=
model
.
message
;
NSString
*
time
=
[
DoraemonUtil
dateFormatNSDate
:
model
.
timestamp
];
NSString
*
content
=
[
NSString
stringWithFormat
:
@"%@
\n
触发时间: %@
\n
文件名称: %@
\n
所在行: %zi
\n
线程id: %@
\n
线程名称: %@ "
,
log
,
time
,
model
.
fileName
,
model
.
line
,
model
.
threadId
,
model
.
threadName
];
NSString
*
content
=
[
NSString
stringWithFormat
:
DoraemonLocalizedString
(
@"%@
\n
触发时间: %@
\n
文件名称: %@
\n
所在行: %zi
\n
线程id: %@
\n
线程名称: %@ "
)
,
log
,
time
,
model
.
fileName
,
model
.
line
,
model
.
threadId
,
model
.
threadName
];
UILabel
*
logLabel
=
[[
UILabel
alloc
]
init
];
logLabel
.
textColor
=
[
UIColor
doraemon_black_1
];
...
...
iOS/DoraemonKit/Src/Logger/List/DoraemonCocoaLumberjackListViewController.m
浏览文件 @
f5d384a0
...
...
@@ -28,7 +28,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"CocoaLumberjack日志记录"
;
self
.
title
=
DoraemonLocalizedString
(
@"CocoaLumberjack日志记录"
)
;
self
.
origArray
=
[
NSArray
arrayWithArray
:[
DoraemonCocoaLumberjackLogger
sharedInstance
].
messages
];
self
.
dataArray
=
[
NSArray
arrayWithArray
:
self
.
origArray
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/AppDelegate.m
浏览文件 @
f5d384a0
...
...
@@ -9,6 +9,7 @@
#import "AppDelegate.h"
#import <DoraemonKit/DoraemonKit.h>
#import "DoraemonDemoHomeViewController.h"
#import "Doraemoni18NUtil.h"
//#import <CocoaLumberjack/CocoaLumberjack.h>
@interface
AppDelegate
()
...
...
@@ -25,7 +26,7 @@
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
//DDLogInfo(@"点击添加埋点11111");
}
[[
DoraemonManager
shareInstance
]
addPluginWithTitle
:
@"测试插件"
icon
:
@"doraemon_default"
desc
:
@"测试插件"
pluginName
:
@"TestPlugin"
atModule
:
@"业务工具"
];
[[
DoraemonManager
shareInstance
]
addPluginWithTitle
:
DoraemonLocalizedString
(
@"测试插件"
)
icon
:
@"doraemon_default"
desc
:
DoraemonLocalizedString
(
@"测试插件"
)
pluginName
:
@"TestPlugin"
atModule
:
DoraemonLocalizedString
(
@"业务工具"
)
];
[[
DoraemonManager
shareInstance
]
addStartPlugin
:
@"StartPlugin"
];
[[
DoraemonManager
shareInstance
]
install
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Common/DoraemonDemoCommonViewController.m
浏览文件 @
f5d384a0
...
...
@@ -18,11 +18,11 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"通用测试"
;
self
.
title
=
DoraemonLocalizedString
(
@"通用测试"
)
;
UIButton
*
btn0
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
,
self
.
view
.
doraemon_width
,
60
)];
btn0
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn0
setTitle
:
@"子线程UI操作"
forState
:
UIControlStateNormal
];
[
btn0
setTitle
:
DoraemonLocalizedString
(
@"子线程UI操作"
)
forState
:
UIControlStateNormal
];
[
btn0
addTarget
:
self
action
:
@selector
(
addSubViewAtOtherThread
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn0
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Crash/DoraemonDemoCrashViewController.m
浏览文件 @
f5d384a0
...
...
@@ -34,7 +34,7 @@ typedef struct Test
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
self
.
title
=
@"crash查看"
;
self
.
title
=
DoraemonLocalizedString
(
@"crash查看"
)
;
[
self
.
view
addSubview
:
self
.
uncaughtExceptionBtn
];
[
self
.
view
addSubview
:
self
.
signalExceptionBtn
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Home/DoraemonDemoHomeViewController.m
浏览文件 @
f5d384a0
...
...
@@ -16,6 +16,7 @@
#import "DoraemonDemoCrashViewController.h"
#import "DoraemonDemoCommonViewController.h"
#import <objc/runtime.h>
#import "Doraemoni18NUtil.h"
@interface
DoraemonDemoHomeViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
>
...
...
@@ -25,7 +26,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"DoraemonKit"
;
self
.
title
=
DoraemonLocalizedString
(
@"DoraemonKit"
)
;
self
.
navigationItem
.
leftBarButtonItems
=
nil
;
UITableView
*
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
...
...
@@ -47,21 +48,21 @@
NSString
*
txt
=
nil
;
NSInteger
row
=
indexPath
.
row
;
if
(
row
==
0
)
{
txt
=
@"沙盒测试Demo"
;
txt
=
DoraemonLocalizedString
(
@"沙盒测试Demo"
)
;
}
else
if
(
row
==
1
){
txt
=
@"日记测试Demo"
;
txt
=
DoraemonLocalizedString
(
@"日记测试Demo"
)
;
}
else
if
(
row
==
2
){
txt
=
@"性能测试Demo"
;
txt
=
DoraemonLocalizedString
(
@"性能测试Demo"
)
;
}
else
if
(
row
==
3
){
txt
=
@"视觉测试Demo"
;
txt
=
DoraemonLocalizedString
(
@"视觉测试Demo"
)
;
}
else
if
(
row
==
4
){
txt
=
@"网络测试Demo"
;
txt
=
DoraemonLocalizedString
(
@"网络测试Demo"
)
;
}
else
if
(
row
==
5
){
txt
=
@"模拟位置Demo"
;
txt
=
DoraemonLocalizedString
(
@"模拟位置Demo"
)
;
}
else
if
(
row
==
6
){
txt
=
@"crash触发Demo"
;
txt
=
DoraemonLocalizedString
(
@"crash触发Demo"
)
;
}
else
if
(
row
==
7
){
txt
=
@"通用测试Demo"
;
txt
=
DoraemonLocalizedString
(
@"通用测试Demo"
)
;
}
cell
.
textLabel
.
text
=
txt
;
return
cell
;
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Logger/DoraemonDemoLoggerViewController.m
浏览文件 @
f5d384a0
...
...
@@ -19,17 +19,17 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"日记测试Demo"
;
self
.
title
=
DoraemonLocalizedString
(
@"日记测试Demo"
)
;
UIButton
*
btn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
,
self
.
view
.
doraemon_width
,
60
)];
btn
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn
setTitle
:
@"添加一条CocoaLumberjack日志"
forState
:
UIControlStateNormal
];
[
btn
setTitle
:
DoraemonLocalizedString
(
@"添加一条CocoaLumberjack日志"
)
forState
:
UIControlStateNormal
];
[
btn
addTarget
:
self
action
:
@selector
(
addLogger
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn
];
UIButton
*
btn_2
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn_2
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn_2
setTitle
:
@"添加一条NSLog日志"
forState
:
UIControlStateNormal
];
[
btn_2
setTitle
:
DoraemonLocalizedString
(
@"添加一条NSLog日志"
)
forState
:
UIControlStateNormal
];
[
btn_2
addTarget
:
self
action
:
@selector
(
addLogger2
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn_2
];
}
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/MockGPS/DoraemonDemoMockGPSViewController.m
浏览文件 @
f5d384a0
...
...
@@ -25,7 +25,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"模拟位置"
;
self
.
title
=
DoraemonLocalizedString
(
@"模拟位置"
)
;
//初始化地图
MKMapView
*
mapView
=
[[
MKMapView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
,
self
.
view
.
doraemon_width
,
self
.
view
.
doraemon_height
)];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Net/DoraemonDemoNetViewController.m
浏览文件 @
f5d384a0
...
...
@@ -30,45 +30,45 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"网络测试Demo"
;
self
.
title
=
DoraemonLocalizedString
(
@"网络测试Demo"
)
;
UIButton
*
btn0
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
,
self
.
view
.
doraemon_width
,
60
)];
btn0
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn0
setTitle
:
@"发送一条URLConnection请求"
forState
:
UIControlStateNormal
];
[
btn0
setTitle
:
DoraemonLocalizedString
(
@"发送一条URLConnection请求"
)
forState
:
UIControlStateNormal
];
[
btn0
addTarget
:
self
action
:
@selector
(
netForURLConnection
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn0
];
_btn0
=
btn0
;
UIButton
*
btn1
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn0
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn1
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn1
setTitle
:
@"发送一条NSURLSession请求"
forState
:
UIControlStateNormal
];
[
btn1
setTitle
:
DoraemonLocalizedString
(
@"发送一条NSURLSession请求"
)
forState
:
UIControlStateNormal
];
[
btn1
addTarget
:
self
action
:
@selector
(
netForNSURLSession
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn1
];
_btn1
=
btn1
;
UIButton
*
btn2
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn1
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn2
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn2
setTitle
:
@"发送一条AFNetworking请求"
forState
:
UIControlStateNormal
];
[
btn2
setTitle
:
DoraemonLocalizedString
(
@"发送一条AFNetworking请求"
)
forState
:
UIControlStateNormal
];
[
btn2
addTarget
:
self
action
:
@selector
(
netForAFNetworking
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn2
];
_btn2
=
btn2
;
UIButton
*
btn3
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn2
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn3
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn3
setTitle
:
@"发送一条AFNetworking请求2"
forState
:
UIControlStateNormal
];
[
btn3
setTitle
:
DoraemonLocalizedString
(
@"发送一条AFNetworking请求2"
)
forState
:
UIControlStateNormal
];
[
btn3
addTarget
:
self
action
:
@selector
(
netForAFNetworking2
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn3
];
_btn3
=
btn3
;
UIButton
*
btn4
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn3
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn4
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn4
setTitle
:
@"打开UIWebView"
forState
:
UIControlStateNormal
];
[
btn4
setTitle
:
DoraemonLocalizedString
(
@"打开UIWebView"
)
forState
:
UIControlStateNormal
];
[
btn4
addTarget
:
self
action
:
@selector
(
openUIWebView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn4
];
UIButton
*
btn5
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn4
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn5
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn5
setTitle
:
@"打开WKWebView"
forState
:
UIControlStateNormal
];
[
btn5
setTitle
:
DoraemonLocalizedString
(
@"打开WKWebView"
)
forState
:
UIControlStateNormal
];
[
btn5
addTarget
:
self
action
:
@selector
(
openWKWebView
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn5
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Net/WebView/DoraemonUIWebViewViewController.m
浏览文件 @
f5d384a0
...
...
@@ -7,6 +7,7 @@
//
#import "DoraemonUIWebViewViewController.h"
#import "Doraemoni18NUtil.h"
@interface
DoraemonUIWebViewViewController
()
...
...
@@ -17,7 +18,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"UIWebView"
;
self
.
title
=
DoraemonLocalizedString
(
@"UIWebView"
)
;
UIWebView
*
view
=
[[
UIWebView
alloc
]
initWithFrame
:
self
.
view
.
frame
];
[
view
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
@"https://www.baidu.com"
]]];
[
self
.
view
addSubview
:
view
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Net/WebView/DoraemonWKWebViewViewController.m
浏览文件 @
f5d384a0
...
...
@@ -8,7 +8,7 @@
#import "DoraemonWKWebViewViewController.h"
#import <WebKit/WebKit.h>
#import "Doraemoni18NUtil.h"
@interface
DoraemonWKWebViewViewController
()
...
...
@@ -19,7 +19,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"WKWebView"
;
self
.
title
=
DoraemonLocalizedString
(
@"WKWebView"
)
;
WKWebView
*
webView
=
[[
WKWebView
alloc
]
initWithFrame
:
self
.
view
.
frame
];
[
webView
loadRequest
:[
NSURLRequest
requestWithURL
:[
NSURL
URLWithString
:
@"https://www.baidu.com"
]]];
[
self
.
view
addSubview
:
webView
];
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Performance/DoraemonDemoPerformanceViewController.m
浏览文件 @
f5d384a0
...
...
@@ -32,42 +32,42 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"性能测试Demo"
;
self
.
title
=
DoraemonLocalizedString
(
@"性能测试Demo"
)
;
_highCPU
=
NO
;
_highMemory
=
NO
;
UIButton
*
btn0
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
,
self
.
view
.
doraemon_width
,
60
)];
btn0
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn0
setTitle
:
@"低FPS操作打开"
forState
:
UIControlStateNormal
];
[
btn0
setTitle
:
DoraemonLocalizedString
(
@"低FPS操作打开"
)
forState
:
UIControlStateNormal
];
[
btn0
addTarget
:
self
action
:
@selector
(
fpsClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn0
];
_btn0
=
btn0
;
UIButton
*
btn1
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn0
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn1
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn1
setTitle
:
@"高CPU操作打开"
forState
:
UIControlStateNormal
];
[
btn1
setTitle
:
DoraemonLocalizedString
(
@"高CPU操作打开"
)
forState
:
UIControlStateNormal
];
[
btn1
addTarget
:
self
action
:
@selector
(
cpuClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn1
];
_btn1
=
btn1
;
UIButton
*
btn2
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn1
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn2
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn2
setTitle
:
@"高内存操作打开"
forState
:
UIControlStateNormal
];
[
btn2
setTitle
:
DoraemonLocalizedString
(
@"高内存操作打开"
)
forState
:
UIControlStateNormal
];
[
btn2
addTarget
:
self
action
:
@selector
(
memoryClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn2
];
_btn2
=
btn2
;
UIButton
*
btn3
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn2
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn3
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn3
setTitle
:
@"高流量操作打开"
forState
:
UIControlStateNormal
];
[
btn3
setTitle
:
DoraemonLocalizedString
(
@"高流量操作打开"
)
forState
:
UIControlStateNormal
];
[
btn3
addTarget
:
self
action
:
@selector
(
flowClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn3
];
_btn3
=
btn3
;
UIButton
*
btn4
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn3
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn4
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn4
setTitle
:
@"卡顿操作打开"
forState
:
UIControlStateNormal
];
[
btn4
setTitle
:
DoraemonLocalizedString
(
@"卡顿操作打开"
)
forState
:
UIControlStateNormal
];
[
btn4
addTarget
:
self
action
:
@selector
(
anrClick
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn4
];
_btn4
=
btn4
;
...
...
@@ -92,12 +92,12 @@
_cpuThread
.
name
=
@"HighCPUThread"
;
[
_cpuThread
start
];
[
_btn1
setTitle
:
@"高CPU操作关闭"
forState
:
UIControlStateNormal
];
[
_btn1
setTitle
:
DoraemonLocalizedString
(
@"高CPU操作关闭"
)
forState
:
UIControlStateNormal
];
}
else
{
[
_cpuThread
cancel
];
_cpuThread
=
nil
;
[
_btn1
setTitle
:
@"高CPU操作打开"
forState
:
UIControlStateNormal
];
[
_btn1
setTitle
:
DoraemonLocalizedString
(
@"高CPU操作打开"
)
forState
:
UIControlStateNormal
];
}
}
...
...
@@ -108,12 +108,12 @@
_memoryThread
.
name
=
@"HighMemoryThread"
;
[
_memoryThread
start
];
[
_btn2
setTitle
:
@"高内存操作关闭"
forState
:
UIControlStateNormal
];
[
_btn2
setTitle
:
DoraemonLocalizedString
(
@"高内存操作关闭"
)
forState
:
UIControlStateNormal
];
}
else
{
[
_memoryThread
cancel
];
_memoryThread
=
nil
;
[
_btn2
setTitle
:
@"高内存操作打开"
forState
:
UIControlStateNormal
];
[
_btn2
setTitle
:
DoraemonLocalizedString
(
@"高内存操作打开"
)
forState
:
UIControlStateNormal
];
}
}
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/Sanbox/DoraemonDemoSanboxViewController.m
浏览文件 @
f5d384a0
...
...
@@ -19,41 +19,41 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"沙盒测试Demo"
;
self
.
title
=
DoraemonLocalizedString
(
@"沙盒测试Demo"
)
;
UIButton
*
btn
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
IPHONE_NAVIGATIONBAR_HEIGHT
,
self
.
view
.
doraemon_width
,
60
)];
btn
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn
setTitle
:
@"添加一条json到沙盒中"
forState
:
UIControlStateNormal
];
[
btn
setTitle
:
DoraemonLocalizedString
(
@"添加一条json到沙盒中"
)
forState
:
UIControlStateNormal
];
[
btn
addTarget
:
self
action
:
@selector
(
addFile
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn
];
UIButton
*
btn1
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn1
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn1
setTitle
:
@"添加一张图片到沙盒中"
forState
:
UIControlStateNormal
];
[
btn1
setTitle
:
DoraemonLocalizedString
(
@"添加一张图片到沙盒中"
)
forState
:
UIControlStateNormal
];
[
btn1
addTarget
:
self
action
:
@selector
(
addImageFile
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn1
];
UIButton
*
btn2
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn1
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn2
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn2
setTitle
:
@"添加一段mp4到沙盒中"
forState
:
UIControlStateNormal
];
[
btn2
setTitle
:
DoraemonLocalizedString
(
@"添加一段mp4到沙盒中"
)
forState
:
UIControlStateNormal
];
[
btn2
addTarget
:
self
action
:
@selector
(
addMP4File
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn2
];
UIButton
*
btn3
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn2
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn3
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn3
setTitle
:
@"添加doc、xlsx、pdf到沙盒中"
forState
:
UIControlStateNormal
];
[
btn3
setTitle
:
DoraemonLocalizedString
(
@"添加doc、xlsx、pdf到沙盒中"
)
forState
:
UIControlStateNormal
];
[
btn3
addTarget
:
self
action
:
@selector
(
addOtherFile
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn3
];
UIButton
*
btn4
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn3
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn4
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn4
setTitle
:
@"添加html到沙盒中"
forState
:
UIControlStateNormal
];
[
btn4
setTitle
:
DoraemonLocalizedString
(
@"添加html到沙盒中"
)
forState
:
UIControlStateNormal
];
[
btn4
addTarget
:
self
action
:
@selector
(
addHtmlFile
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn4
];
UIButton
*
btn5
=
[[
UIButton
alloc
]
initWithFrame
:
CGRectMake
(
0
,
btn4
.
doraemon_bottom
+
20
,
self
.
view
.
doraemon_width
,
60
)];
btn5
.
backgroundColor
=
[
UIColor
orangeColor
];
[
btn5
setTitle
:
@"添加DB到沙盒中"
forState
:
UIControlStateNormal
];
[
btn5
setTitle
:
DoraemonLocalizedString
(
@"添加DB到沙盒中"
)
forState
:
UIControlStateNormal
];
[
btn5
addTarget
:
self
action
:
@selector
(
addDBFile
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn5
];
}
...
...
iOS/DoraemonKitDemo/DoraemonKitDemo/DemoVC/UI/DoraemonDemoUIViewController.m
浏览文件 @
f5d384a0
...
...
@@ -18,7 +18,7 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"视觉测试Demo"
;
self
.
title
=
DoraemonLocalizedString
(
@"视觉测试Demo"
)
;
UIView
*
redView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
100
,
200
,
60
,
60
)];
redView
.
backgroundColor
=
[
UIColor
redColor
];
...
...
@@ -30,7 +30,7 @@
// [self.view addSubview:alphaView];
UILabel
*
titleLabel
=
[[
UILabel
alloc
]
initWithFrame
:
CGRectMake
(
100
,
400
,
200
,
60
)];
titleLabel
.
text
=
@"我是来测试的"
;
titleLabel
.
text
=
DoraemonLocalizedString
(
@"我是来测试的"
)
;
titleLabel
.
backgroundColor
=
[
UIColor
doraemon_colorWithString
:
@"#00FF00"
];
titleLabel
.
textColor
=
[
UIColor
doraemon_colorWithString
:
@"#FF0000"
];
[
self
.
view
addSubview
:
titleLabel
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录