55import SwiftUI
66import SwiftVB
77
8- // #if os(iOS)
9- // import Drops
10- // #endif
8+ #if os(iOS)
9+ import Drops
10+ #endif
1111
1212@available ( iOS 14 , watchOS 7 . 0 , macOS 11 . 0 , * )
1313public struct SwiftNEW : View {
@@ -66,6 +66,7 @@ public struct SwiftNEW: View {
6666#endif
6767 }
6868 }
69+ . opacity ( size == " invisible " ? 0 : 100 )
6970 . sheet ( isPresented: $show) {
7071 sheetCurrent
7172 . sheet ( isPresented: $historySheet) {
@@ -83,6 +84,7 @@ public struct SwiftNEW: View {
8384 Spacer ( )
8485
8586 headings
87+ . padding ( . bottom)
8688
8789 Spacer ( )
8890
@@ -117,7 +119,7 @@ public struct SwiftNEW: View {
117119 }
118120 }
119121 } . frame ( width: 300 )
120- . frame ( maxHeight: 450 )
122+ . frame ( maxHeight: 450 )
121123 }
122124
123125 Spacer ( )
@@ -171,7 +173,7 @@ public struct SwiftNEW: View {
171173 }
172174 }
173175 }
174- #elseif os(macOS)
176+ #elseif os(macOS) || os(xrOS)
175177 public var headings : some View {
176178 VStack {
177179 Text ( " What's New in " ) . bold ( ) . font ( . largeTitle)
@@ -182,9 +184,20 @@ public struct SwiftNEW: View {
182184 public var showHistoryButton : some View {
183185 Button ( action: { historySheet = true } ) {
184186 HStack {
187+ if align == . trailing {
188+ Spacer ( )
189+ }
185190 Text ( " Show History " )
186191 Image ( systemName: " arrow.up.bin " )
192+ if align == . leading {
193+ Spacer ( )
194+ }
187195 } . font ( . body)
196+ #if os(iOS)
197+ . frame( width: 300 , height: 50 )
198+ #elseif os(macOS)
199+ . frame( width: 200 , height: 25 )
200+ #endif
188201 }
189202#if !os(xrOS)
190203 . foregroundColor( color)
@@ -202,7 +215,11 @@ public struct SwiftNEW: View {
202215 Spacer ( )
203216 }
204217 } . font ( . body)
218+ #if os(iOS)
205219 . frame( width: 300 , height: 50 )
220+ #elseif os(macOS)
221+ . frame( width: 200 , height: 25 )
222+ #endif
206223#if os(iOS) && !os(xrOS)
207224 . foregroundColor( . white)
208225 . background ( color)
@@ -272,7 +289,11 @@ public struct SwiftNEW: View {
272289 Spacer ( )
273290 }
274291 } . font ( . body)
292+ #if os(iOS)
275293 . frame( width: 300 , height: 50 )
294+ #elseif os(macOS)
295+ . frame( width: 300 , height: 25 )
296+ #endif
276297 #if os(iOS)
277298 . foregroundColor( . white)
278299 . background ( color)
@@ -337,13 +358,13 @@ public struct SwiftNEW: View {
337358
338359 #if os(iOS)
339360 public func drop( ) {
340- // let drop = Drop(title: "Tap", subtitle: "To See What's New.", icon: UIImage(systemName: labelImage),
341- // action: .init {
342- // Drops.hideCurrent()
343- // show = true
344- // },
345- // position: .top, duration: 3.0, accessibility: "Alert: Tap to see what's new." )
346- // Drops.show(drop)
361+ let drop = Drop ( title: " Tap " , subtitle: " To See What's New. " , icon: UIImage ( systemName: labelImage) ,
362+ action: . init {
363+ Drops . hideCurrent ( )
364+ show = true
365+ } ,
366+ position: . top, duration: 3.0 , accessibility: " Alert: Tap to see what's new. " )
367+ Drops . show ( drop)
347368 }
348369 #endif
349370}
0 commit comments