Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
DoraemonKit
提交
40e0b34f
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,发现更多精彩内容 >>
提交
40e0b34f
编写于
5月 24, 2019
作者:
Y
yixiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决toast某些情况无法展示的问题
上级
5be5390b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
13 deletion
+7
-13
iOS/DoraemonKit/Src/Core/CommonUI/Toast/DoraemonToastUtil.h
iOS/DoraemonKit/Src/Core/CommonUI/Toast/DoraemonToastUtil.h
+0
-2
iOS/DoraemonKit/Src/Core/CommonUI/Toast/DoraemonToastUtil.m
iOS/DoraemonKit/Src/Core/CommonUI/Toast/DoraemonToastUtil.m
+0
-4
iOS/DoraemonKit/Src/Core/Plugin/H5/DoraemonH5ViewController.m
...DoraemonKit/Src/Core/Plugin/H5/DoraemonH5ViewController.m
+1
-1
iOS/DoraemonKit/Src/Core/Plugin/Sanbox/VC/DoraemonSanboxDetailViewController.m
...ore/Plugin/Sanbox/VC/DoraemonSanboxDetailViewController.m
+1
-1
iOS/DoraemonKit/Src/GPS/DoraemonGPSViewController.m
iOS/DoraemonKit/Src/GPS/DoraemonGPSViewController.m
+5
-5
未找到文件。
iOS/DoraemonKit/Src/Core/CommonUI/Toast/DoraemonToastUtil.h
浏览文件 @
40e0b34f
...
...
@@ -13,8 +13,6 @@ typedef void (^DoraemonHandleRestartCancleActionBlock)(void);
@interface
DoraemonToastUtil
:
NSObject
+
(
void
)
showToast
:(
NSString
*
)
text
;
+
(
void
)
showToast
:(
NSString
*
)
text
inView
:(
UIView
*
)
superView
;
+
(
void
)
handleRestartActionWithVC
:(
UIViewController
*
)
vc
...
...
iOS/DoraemonKit/Src/Core/CommonUI/Toast/DoraemonToastUtil.m
浏览文件 @
40e0b34f
...
...
@@ -15,10 +15,6 @@
@implementation
DoraemonToastUtil
+
(
void
)
showToast
:(
NSString
*
)
text
{
[
DoraemonToastUtil
showToast
:
text
inView
:[
UIApplication
sharedApplication
].
keyWindow
];
}
+
(
void
)
showToast
:(
NSString
*
)
text
inView
:(
UIView
*
)
superView
{
if
(
!
superView
)
{
return
;
...
...
iOS/DoraemonKit/Src/Core/Plugin/H5/DoraemonH5ViewController.m
浏览文件 @
40e0b34f
...
...
@@ -54,7 +54,7 @@
-
(
void
)
jump
{
if
(
_h5UrlTextView
.
text
.
length
==
0
)
{
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"h5链接不能为空"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"h5链接不能为空"
)
inView
:
self
.
view
];
return
;
}
NSString
*
h5Url
=
_h5UrlTextView
.
text
;
...
...
iOS/DoraemonKit/Src/Core/Plugin/Sanbox/VC/DoraemonSanboxDetailViewController.m
浏览文件 @
40e0b34f
...
...
@@ -71,7 +71,7 @@
[
self
presentViewController
:
myQlPreViewController
animated
:
YES
completion
:
nil
];
}
}
else
{
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"文件不存在"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"文件不存在"
)
inView
:
self
.
view
];
}
}
...
...
iOS/DoraemonKit/Src/GPS/DoraemonGPSViewController.m
浏览文件 @
40e0b34f
...
...
@@ -103,7 +103,7 @@
#pragma mark - DoraemonMockGPSInputViewDelegate
-
(
void
)
inputViewOkClick
:(
NSString
*
)
gps
{
if
(
!
[[
DoraemonCacheManager
sharedInstance
]
mockGPSSwitch
])
{
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"mock开关没有打开"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"mock开关没有打开"
)
inView
:
self
.
view
];
return
;
}
NSArray
*
array
=
[
gps
componentsSeparatedByString
:
@" "
];
...
...
@@ -111,18 +111,18 @@
NSString
*
longitudeValue
=
array
[
0
];
NSString
*
latitudeValue
=
array
[
1
];
if
(
longitudeValue
.
length
==
0
||
latitudeValue
.
length
==
0
)
{
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"经纬度不能为空"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"经纬度不能为空"
)
inView
:
self
.
view
];
return
;
}
CGFloat
longitude
=
[
longitudeValue
floatValue
];
CGFloat
latitude
=
[
latitudeValue
floatValue
];
if
(
longitude
<
-
180
||
longitude
>
180
)
{
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"经度不合法"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"经度不合法"
)
inView
:
self
.
view
];
return
;
}
if
(
latitude
<
-
90
||
latitude
>
90
){
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"纬度不合法"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"纬度不合法"
)
inView
:
self
.
view
];
return
;
}
...
...
@@ -137,7 +137,7 @@
CLLocation
*
loc
=
[[
CLLocation
alloc
]
initWithLatitude
:
coordinate
.
latitude
longitude
:
coordinate
.
longitude
];
[[
DoraemonGPSMocker
shareInstance
]
mockPoint
:
loc
];
}
else
{
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"格式不正确"
)];
[
DoraemonToastUtil
showToast
:
DoraemonLocalizedString
(
@"格式不正确"
)
inView
:
self
.
view
];
return
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录