@michaelsteeber@mastodon.social
@michaelsteeber@mastodon.social avatar

michaelsteeber

@michaelsteeber@mastodon.social

Walking The Perimeter

This profile is from a federated server and may be incomplete. Browse more on the original instance.

michaelsteeber, to random
@michaelsteeber@mastodon.social avatar

All I can see is the fake bird in A Bug's Life
https://botsin.space/@oldroadside/112485713671027040

michaelsteeber, to random
@michaelsteeber@mastodon.social avatar

I’m using scrollPosition in SwiftUI on a new view, and I find it surprising that the position won’t update unless you physically drag your finger on the ScrollView. Removing/reordering items in the view doesn't trigger an update (even though the visible item changes) and using a ScrollViewReader with .scrollTo does not trigger an update. So when I remove an item from my list, I have to explicitly update the value of scrollPosition to an index +/- 1 depending on if the item was last in the list.

michaelsteeber,
@michaelsteeber@mastodon.social avatar

This is a problem because in this particular view, scrollPosition tells me which item to delete (the active one), so if the position isn't up to date, a nil item will be deleted.

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