Member-only story

Text Scroll using SwiftUI

Like Star Wars? Done!

Steven Curtis
2 min readJun 25, 2020
Photo by Daniel Cheung on Unsplash

Imagine that you want to create a scrolling view Star-Wars style. Well, Imagine no longer!

Difficulty: **Beginner** | Easy | Normal | Challenging<br/>

This article has been developed using Xcode 11.5, and Swift 5.2.4

Prerequisites:

The example

This example is a nice one about how to scroll text up the screen in SwiftUI using instance methods on the Text struct.

That one thing

To find out the height of the device I used GeometryReader which is wrapped around the Text view.

That’s enough!

Let us see the code, let us see the code. Ok: here it is.

Click for Gist

Conclusion

--

--

No responses yet