zl程序教程

您现在的位置是:首页 >  其他

当前栏目

popover <Content> (SwiftUI 中文文档手册 教程含源码)

中文文档源码教程 手册 SwiftUI content
2023-09-11 14:18:48 时间

popover

在给定条件为真时显示弹出框。

func popover<Content>(isPresented: Binding<Bool>, attachmentAnchor: PopoverAttachmentAnchor = .rect(.bounds), arrowEdge: Edge = .top, content: @escaping () -> Content) -> some View where Content : View

参数

  • isPresented
    对是否显示弹出窗口的绑定。
  • attachmentAnchor
    定位锚点,用于定义弹出框的附加位置。
  • arrowEdge
    弹出式箭头所在的attachmentAnchor的边缘。
  • content
    一个闭包,返回弹出窗口的内容。

加入我们一起学习SwiftUI

QQ:3365059189
SwiftUI技术交流QQ群:518696470
教程网站:www.swiftuigit.com