Post

Replies

Boosts

Views

Activity

Reply to Live Activity animate
Based on apple's developer documentation for ActivityKit, You cannot change the default animation for Live Activities. The system ignores any animation modifiers that you specify and uses its own animation timing instead. However, you can configure the built-in transitions for adding and removing views, and for timer text. To achieve no effect, you can use multiple views that pop in and out based on the content state. if !context.state.imageName.isEmpty { Image(systemName: context.state.imageName) .resizable() .frame(width: 30, height: 30) .padding(.trailing, 10) } else { Image("live-activity-logo") .resizable() .frame(width: 30, height: 30) .padding(.trailing, 10) } You can use the transition modifier for these views to appear in an animated way as described in the documentation.
Apr ’23
Reply to Unknown Crash
Facing the same issue, was this issue resolved for anyone?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to How to change TabView background color with SwiftUI?
@timisenman I've tried the same but didn't work unfortunately. What worked for me actually is to use the .toolbarBackground(_:for) modifier on ContentView() instead of TabView{} Is there any recent update on this?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Live Activity animate
Based on apple's developer documentation for ActivityKit, You cannot change the default animation for Live Activities. The system ignores any animation modifiers that you specify and uses its own animation timing instead. However, you can configure the built-in transitions for adding and removing views, and for timer text. To achieve no effect, you can use multiple views that pop in and out based on the content state. if !context.state.imageName.isEmpty { Image(systemName: context.state.imageName) .resizable() .frame(width: 30, height: 30) .padding(.trailing, 10) } else { Image("live-activity-logo") .resizable() .frame(width: 30, height: 30) .padding(.trailing, 10) } You can use the transition modifier for these views to appear in an animated way as described in the documentation.
Replies
Boosts
Views
Activity
Apr ’23