Some apps can benefit from being able to programatically scroll to a specific item in a ScrollView. Apple provides the means to do this with the ScrollViewReader. By calling scrollTo and providing it a position of the item, you can programatically have the items scrolled to the correct location.
This is particularly useful for apps such as chat messages, emails, or anything that lists items. For chat messages, you may want to scroll back up to the first unread message.
Lets take a look at how this works.
[Read more…]