Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
zhangzhonghua
/
BoneHouse_Business_APP
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
96a5af79
authored
Mar 09, 2021
by
wong.peiyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ios状态栏高度修改
parent
10012595
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
app/containers/common/StatusBarView.js
app/containers/login/LoginPage.js
app/utils/Utils.js
app/containers/common/StatusBarView.js
View file @
96a5af79
...
@@ -4,7 +4,7 @@ import {isIphoneX} from '../../utils/Utils'
...
@@ -4,7 +4,7 @@ import {isIphoneX} from '../../utils/Utils'
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
const
iosStatusBarHeight
=
20
;
const
iosStatusBarHeight
=
20
;
const
iosStatusBarXHeight
=
4
4
;
const
iosStatusBarXHeight
=
4
8
;
const
PropTypes
=
require
(
'prop-types'
);
const
PropTypes
=
require
(
'prop-types'
);
class
StatusBarView
extends
Component
{
class
StatusBarView
extends
Component
{
...
@@ -23,7 +23,6 @@ class StatusBarView extends Component {
...
@@ -23,7 +23,6 @@ class StatusBarView extends Component {
render
()
{
render
()
{
let
height
=
0
let
height
=
0
if
(
Platform
.
OS
==
'ios'
)
{
if
(
Platform
.
OS
==
'ios'
)
{
if
(
this
.
props
.
isReactStackNavigator
)
{
if
(
this
.
props
.
isReactStackNavigator
)
{
height
=
isIphoneX
()
?
iosStatusBarXHeight
:
iosStatusBarHeight
height
=
isIphoneX
()
?
iosStatusBarXHeight
:
iosStatusBarHeight
...
...
app/containers/login/LoginPage.js
View file @
96a5af79
app/utils/Utils.js
View file @
96a5af79
...
@@ -50,8 +50,11 @@ export const isEmpty = (data) => {
...
@@ -50,8 +50,11 @@ export const isEmpty = (data) => {
const
X_WIDTH
=
375
;
const
X_WIDTH
=
375
;
const
X_HEIGHT
=
812
;
const
X_HEIGHT
=
812
;
const
XS_MAX_WIDTH
=
414
;
const
X_MAX_WIDTH
=
414
;
const
XS_MAX_HEIGHT
=
896
;
const
X_MAX_HEIGHT
=
896
;
const
XS_MAX_WIDTH
=
428
;
const
XS_MAX_HEIGHT
=
926
;
const
screenW
=
Dimensions
.
get
(
'window'
).
width
;
const
screenW
=
Dimensions
.
get
(
'window'
).
width
;
const
screenH
=
Dimensions
.
get
(
'window'
).
height
;
const
screenH
=
Dimensions
.
get
(
'window'
).
height
;
...
@@ -60,6 +63,7 @@ export const isIphoneX = () => {
...
@@ -60,6 +63,7 @@ export const isIphoneX = () => {
return
(
return
(
Platform
.
OS
===
'ios'
&&
Platform
.
OS
===
'ios'
&&
((
screenH
===
X_HEIGHT
&&
screenW
===
X_WIDTH
)
||
((
screenH
===
X_HEIGHT
&&
screenW
===
X_WIDTH
)
||
(
screenH
===
X_MAX_HEIGHT
&&
screenW
===
X_MAX_WIDTH
)
||
(
screenH
===
XS_MAX_HEIGHT
&&
screenW
===
XS_MAX_WIDTH
))
(
screenH
===
XS_MAX_HEIGHT
&&
screenW
===
XS_MAX_WIDTH
))
)
)
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment