You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In iOS 14 the .fullScreenCover and .sheet modifier can't be more than one per view so we use the workaround found on this thread.
case .fullscreen:
// In iOS 14 the .fullScreenCover modifier can't be more than one per view
// so we use the workaround found on this thread.
// https://stackoverflow.com/a/64403206/2242854
if #available(iOS 15,*){
content.fullScreenCover(isPresented: $state.isPresented){LazyView(navigationContent())}}else{Group{EmptyView().fullScreenCover(isPresented: $state.isPresented){LazyView(navigationContent())}
content
}}
case .sheet:
// In iOS 14 the .sheet modifier can't be more than one per view
// so we use the workaround found on this thread.
// https://stackoverflow.com/a/64403206/2242854
if #available(iOS 15,*){
content.sheet(isPresented: $state.isPresented){LazyView(navigationContent())}}else{Group{EmptyView().sheet(isPresented: $state.isPresented){LazyView(navigationContent())}
content
}}
The text was updated successfully, but these errors were encountered:
In iOS 14 the
.fullScreenCover
and.sheet
modifier can't be more than one per view so we use the workaround found on this thread.The text was updated successfully, but these errors were encountered: