Post

Replies

Boosts

Views

Activity

Comment on SwiftUI - Using the Drag and Magnification Gestures Sequenced
Yea, I was doing this for my scaling: `Image(uiImage: image)                     .resizable()                     .frame(width: width, height: height)                     .clipShape(RoundedRectangle(cornerRadius: 20))                     .scaleEffect(self.isDragging ? 1.5 : 1)                     .offset(self.currentPosition)                     .gesture(combined)                     .scaleEffect(self.scale)                     .onAppear{                         self.loadImage()` So basically assigning the changed scale to the .scaleEffect() of the view. I also tried with the new .onUpdated() in the MagnificationGesture, like this: `.gesture(MagnificationGesture()                         .updating($scale, body: { (value, scale, trans) in                             scale = value.magnitude                         }))             .scaleEffect(scale)         And defined@GestureState private var scale: CGFloat = 1.0` in the definition of my view. None of this seems to work. :(
Mar ’22