Post

Replies

Boosts

Views

Activity

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)) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
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)) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
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)) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
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)) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to LLDB RPC Server Crash Playground File XCode 16.0
Hi, Sorry it took so long to get back to you. It does run correctly if I switch it to Swift 5.
Replies
Boosts
Views
Activity
Oct ’24