react-native - React Native 中的 clipsToBounds

标签 react-native

什么是 clipsToBounds = true 的替代品在 React Native 中?我有超出父 View 范围的 subview 。在使用 swift 的 iOS 中,我会用 clipsToBounds = true 解决它

最佳答案

您必须使用 style您的 View 和设置的属性 overflowhidden .像这样的东西:

<View style={{ overflow: ‘hidden’ }}>
   {/* These views won’t be presented out of the view */}
</View>

关于react-native - React Native 中的 clipsToBounds,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55282415/

相关文章:

react-native - React Native - NativeBase 组件在 iOS 上没有占据全宽

javascript - 无法在 react-native-highcharts 的 events.load 方法中访问外部变量

reactjs - 我们如何在 react-native 中将崩溃错误发送到自己的服务器

javascript - 如何在 React Native 中播放声音?

React-native 依赖错误(com.atlassian.mobile.video okhttp-ws-compat)

javascript - React Native 警告 - 例如 "PropTypes has been moved to a separate package"

javascript - 如何在 Touchable 组件中包含 ScrollView?

javascript - 如何为某个测试更改 Jest 模拟的实现

javascript - 复选框状态的更改无法识别 ReactJS

javascript - 退出抽屉内的子堆栈导航器时如何使用 react 导航转到 initialRoute?