Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_34031325
engine
提交
dbc071aa
E
engine
项目概览
qq_34031325
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
dbc071aa
编写于
1月 30, 2018
作者:
C
Chris Bracken
提交者:
GitHub
1月 30, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use
@Available
checks for iOS 11 features (#4619)
Use
@Available
checks for iOS 11 features
上级
d68d19f8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
17 deletion
+5
-17
shell/platform/darwin/ios/framework/Source/FlutterViewController.mm
...form/darwin/ios/framework/Source/FlutterViewController.mm
+5
-17
未找到文件。
shell/platform/darwin/ios/framework/Source/FlutterViewController.mm
浏览文件 @
dbc071aa
...
@@ -81,7 +81,6 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse {
...
@@ -81,7 +81,6 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse {
bool
_platformSupportsTouchTypes
;
bool
_platformSupportsTouchTypes
;
bool
_platformSupportsTouchPressure
;
bool
_platformSupportsTouchPressure
;
bool
_platformSupportsTouchOrientationAndTilt
;
bool
_platformSupportsTouchOrientationAndTilt
;
bool
_platformSupportsSafeAreaInsets
;
BOOL
_initialized
;
BOOL
_initialized
;
BOOL
_connected
;
BOOL
_connected
;
}
}
...
@@ -130,7 +129,6 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse {
...
@@ -130,7 +129,6 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse {
_platformSupportsTouchTypes
=
fml
::
IsPlatformVersionAtLeast
(
9
);
_platformSupportsTouchTypes
=
fml
::
IsPlatformVersionAtLeast
(
9
);
_platformSupportsTouchPressure
=
fml
::
IsPlatformVersionAtLeast
(
9
);
_platformSupportsTouchPressure
=
fml
::
IsPlatformVersionAtLeast
(
9
);
_platformSupportsTouchOrientationAndTilt
=
fml
::
IsPlatformVersionAtLeast
(
9
,
1
);
_platformSupportsTouchOrientationAndTilt
=
fml
::
IsPlatformVersionAtLeast
(
9
,
1
);
_platformSupportsSafeAreaInsets
=
fml
::
IsPlatformVersionAtLeast
(
11
,
0
);
_orientationPreferences
=
UIInterfaceOrientationMaskAll
;
_orientationPreferences
=
UIInterfaceOrientationMaskAll
;
_statusBarStyle
=
UIStatusBarStyleDefault
;
_statusBarStyle
=
UIStatusBarStyleDefault
;
...
@@ -621,11 +619,9 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to
...
@@ -621,11 +619,9 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to
}
}
-
(
void
)
viewSafeAreaInsetsDidChange
{
-
(
void
)
viewSafeAreaInsetsDidChange
{
if
(
_platformSupportsSafeAreaInsets
)
{
[
self
updateViewportPadding
];
[
self
updateViewportPadding
];
[
self
updateViewportMetrics
];
[
self
updateViewportMetrics
];
[
super
viewSafeAreaInsetsDidChange
];
[
super
viewSafeAreaInsetsDidChange
];
}
}
}
// Updates _viewportMetrics physical padding.
// Updates _viewportMetrics physical padding.
...
@@ -633,16 +629,11 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to
...
@@ -633,16 +629,11 @@ static inline blink::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* to
// Viewport padding represents the iOS safe area insets.
// Viewport padding represents the iOS safe area insets.
-
(
void
)
updateViewportPadding
{
-
(
void
)
updateViewportPadding
{
CGFloat
scale
=
[
UIScreen
mainScreen
].
scale
;
CGFloat
scale
=
[
UIScreen
mainScreen
].
scale
;
// TODO(cbracken) once clang toolchain compiler-rt has been updated, replace with
if
(
@available
(
iOS
11
,
*
))
{
// if (@available(iOS 11, *)) {
if
(
_platformSupportsSafeAreaInsets
)
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
_viewportMetrics
.
physical_padding_top
=
self
.
view
.
safeAreaInsets
.
top
*
scale
;
_viewportMetrics
.
physical_padding_top
=
self
.
view
.
safeAreaInsets
.
top
*
scale
;
_viewportMetrics
.
physical_padding_left
=
self
.
view
.
safeAreaInsets
.
left
*
scale
;
_viewportMetrics
.
physical_padding_left
=
self
.
view
.
safeAreaInsets
.
left
*
scale
;
_viewportMetrics
.
physical_padding_right
=
self
.
view
.
safeAreaInsets
.
right
*
scale
;
_viewportMetrics
.
physical_padding_right
=
self
.
view
.
safeAreaInsets
.
right
*
scale
;
_viewportMetrics
.
physical_padding_bottom
=
self
.
view
.
safeAreaInsets
.
bottom
*
scale
;
_viewportMetrics
.
physical_padding_bottom
=
self
.
view
.
safeAreaInsets
.
bottom
*
scale
;
#pragma clang diagnostic pop
}
else
{
}
else
{
_viewportMetrics
.
physical_padding_top
=
[
self
statusBarPadding
]
*
scale
;
_viewportMetrics
.
physical_padding_top
=
[
self
statusBarPadding
]
*
scale
;
}
}
...
@@ -828,11 +819,8 @@ constexpr CGFloat kStandardStatusBarHeight = 20.0;
...
@@ -828,11 +819,8 @@ constexpr CGFloat kStandardStatusBarHeight = 20.0;
-
(
void
)
handleStatusBarTouches
:(
UIEvent
*
)
event
{
-
(
void
)
handleStatusBarTouches
:(
UIEvent
*
)
event
{
CGFloat
standardStatusBarHeight
=
kStandardStatusBarHeight
;
CGFloat
standardStatusBarHeight
=
kStandardStatusBarHeight
;
if
(
_platformSupportsSafeAreaInsets
)
{
if
(
@available
(
iOS
11
,
*
))
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
standardStatusBarHeight
=
self
.
view
.
safeAreaInsets
.
top
;
standardStatusBarHeight
=
self
.
view
.
safeAreaInsets
.
top
;
#pragma clang diagnostic pop
}
}
// If the status bar is double-height, don't handle status bar taps. iOS
// If the status bar is double-height, don't handle status bar taps. iOS
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录