Post

Replies

Boosts

Views

Activity

Reply to SwiftUI Shape concurrency warnings
The same issue appears when using animatableData with GeometryEffect: struct ShakeEffect: GeometryEffect { var position: CGFloat var animatableData: CGFloat { get { position } set { position = newValue } } init(shakes: Int) { position = CGFloat(shakes) } func effectValue(size: CGSize) -> ProjectionTransform { return ProjectionTransform( CGAffineTransform(translationX: -30 * sin(position * 2 * .pi), y: 0)) } }
1w
Reply to Xcode 16 Beta: Animatable + non isolated protocol requirement errors.
same here: struct ShakeEffect: GeometryEffect { var position: CGFloat var animatableData: CGFloat { //same error as in original post here get {position} set {position = newValue} } init(shakes: Int) { position = CGFloat(shakes) } func effectValue(size: CGSize) -> ProjectionTransform { //same error as in original post here ProjectionTransform(CGAffineTransform(translationX: -30 * sin(position * 2 * .pi), y: 0)) } }
1w