[英]SwiftUI - the bottom sheet has an area which changes the background on contact with content
There is a bottom sheet in the settings default app, in this bottom sheet there is a certain area with a button that changes the background
when it comes into contact with content
such as a NavigationBar
or a TabView
.设置默认应用程序中有一个底部工作表,在这个底部工作表中有一个带有按钮的特定区域,当它接触到
NavigationBar
或TabView
等content
时,该按钮会更改background
。 How can this be implemented?如何实施?
I tried putting a button in toolbar on the bottom bar, it worked fine and close to what I wanted, but the area is too small.我尝试在底部栏的工具栏中放置一个按钮,它工作正常并且接近我想要的,但是面积太小了。 I also tried
.safeAreaInset
with .bottomBar
placement, but how to make the background
change from what is above the content
and disappear when there is no content
below it like in video.我还尝试了
.safeAreaInset
和.bottomBar
放置,但是如何使background
从content
content
消失。
It sounds like you are looking for a way to make the background opaque or blur it.听起来您正在寻找一种使背景不透明或模糊的方法。
The answers to this related question (the Opaque approach) may help you or you can try the answers for this question on how to Blur the background . 这个相关问题的答案(不透明方法)可能对你有帮助,或者你可以尝试这个问题的答案 how to Blur the background 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.