christianselig,
@christianselig@mastodon.social avatar

SwiftUI question: I'm trying to make a slider that expands on touch. How do I make it so the progress part's height animates (instead of jumping), but the width stays instantly responsive (no animation)?

No matter where I put the .animation() modifiers I cannot seem to get it, haha

Gist: https://gist.github.com/christianselig/eda075422436f4e4934565da001455d4

Video of code with an interactive SwiftUI custom slider that jumps into place as soon as you start dragging, which looks weird. Code is available in linked GitHub Gist.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines