Post

Replies

Boosts

Views

Activity

Reply to NavigationLink selection not working as expected
Why should the ColorDetail pop the view, when you are just resetting the selectedView state? To pop you have to dismiss the presented View like so: struct ColorDetail : View { //get the presentation mode from the environment:     @Environment(\.presentationMode) var presentation     @Binding var selectedView : Int?     var color : String     var body : some View {         VStack {             Text (color)             Text ("SelectedView: \(selectedView ?? 99)")             Button ("set SelectedView to nil and go back")             {                 self.selectedView = nil //Pop the detail view:                 self.presentation.wrappedValue.dismiss()             }         }     } } Hope it helps Klaus
Dec ’20
Reply to Special blending mode (Overlay) for UIView with app background
To the best of my knowledge this will not work, at least I have never managed to pull this off ;-)The layers are composited within the view in the given mode, but the views are then composited just based on the resulting alpha.So, what can you do to achieve what you are trying to do? Basically, you have to work with multple Layers within the same view. CALayers are generally worth diving into, especially CAShapeLayer provides a high performance GPU driven way to draw with shapes.Hope it helpsKlaus
May ’20