Skip to content

Commit

Permalink
fix: 使用native-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
human committed Jan 15, 2025
1 parent e970b23 commit 8ab4e76
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class RNIntersectionObserver {
if (this.windowRect) return this.windowRect
const navigation = getFocusedNavigation() || {}
const screen = Dimensions.get('screen')
const navigationLayout = navigation.layout || {
const navigationLayout = navigation.layout || {
x: 0,
y: 0,
width: screen.width,
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/platform/createApp.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { LIFECYCLE } from '../platform/patch/lifecycle/index'
import Mpx from '../index'
import { createElement, memo, useRef, useEffect } from 'react'
import * as ReactNative from 'react-native'
import { Image } from 'react-native'

const appHooksMap = makeMap(mergeLifecycle(LIFECYCLE).app)

Expand Down
9 changes: 2 additions & 7 deletions packages/core/src/platform/patch/getDefaultOptions.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,9 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
headerStyle: {
backgroundColor: pageConfig.navigationBarBackgroundColor || '#000000'
},
headerTintColor: pageConfig.navigationBarTextStyle || 'white'
headerTintColor: pageConfig.navigationBarTextStyle || 'white',
statusBarTranslucent: true
})
if (__mpx_mode__ === 'android') {
ReactNative.StatusBar.setBarStyle(pageConfig.barStyle || 'dark-content')
ReactNative.StatusBar.setTranslucent(isCustom) // 控制statusbar是否占位
const color = isCustom ? 'transparent' : pageConfig.statusBarColor
color && ReactNative.StatusBar.setBackgroundColor(color)
}
}, [])

const rootRef = useRef(null)
Expand Down

0 comments on commit 8ab4e76

Please sign in to comment.