美文网首页
iOS 15-WidgetKit-iPadOS增加尺寸类型

iOS 15-WidgetKit-iPadOS增加尺寸类型

作者: CocoaJason | 来源:发表于2021-06-08 22:00 被阅读0次
    /// An extra large widget.
        ///
        /// > Note: This property is only available in iPadOS.
        @available(iOS 15.0, *)
        @available(macOS, unavailable)
        case systemExtraLarge
    
    struct Extension_TwoEntryView : View {
        var entry: Extension_Two_Provider.Entry
    
        @Environment(\.widgetFamily) var family
        var body: some View {
            switch family {
            case .systemSmall:
                Extension_Two_SmallView()
            case .systemMedium:
                Extension_Two_MediumView()
            case .systemExtraLarge:
                Extension_Two_ExtraLargeView()
            default:
                Extension_Two_LargeView()
            }
        }
    }
    

    相关文章

      网友评论

          本文标题:iOS 15-WidgetKit-iPadOS增加尺寸类型

          本文链接:https://www.haomeiwen.com/subject/fgzjeltx.html