admin管理员组文章数量:1123011
I realize that with a SwiftUI popover you can set its attachment anchor but is there really no way to tell influence whether SwiftUI puts the popover box below what is presented?
Take this design here
When implemented in SwiftUI like this
Button {
showDetails = true
} label: {
HStack {
Text(name)
Image(systemName: "chevron.down")
}
}
.font(.system(size: 16, weight: .bold))
.popover(isPresented: $showDetails, attachmentAnchor: .point(.bottom)) {
Details(id: id)
}
I get this ugly behavior where the popover covers the object that displayed it even though there is plenty of space below the button to display the popover without overlap.
I am guessing SwiftUI has some "rules" about what it thinks is best for where the popover should go but is there really no way to influence them?
版权声明:本文标题:Is there any way to tell SwiftUI to present popover content below the object displaying it? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736538877a1944358.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论