TextScroll: Week 5, July 7 – Michelle

With this tutorial, I got my scrollview animating, but hooking it up to tilt was another challenge. All the tutorials I saw online for manually controlling the animation used a UISlider with a simple “offset = slider.value”, which was working fine in my own project as well. However, if I did the exact same with with accel, “offset = accel”, the text wouldn’t move. After getting some help from Michael, I found that the offset was updating properly, but the screen just wasn’t refreshing to display those changes. The slider worked because it had refreshing built in the object already. Once I put the “offset = accel” command into a multithread, it worked! This naiive equation resulted in very jittery text tilting movement because the accelerometer is really sensitive, so dampening the accel value with “accel/100” resulted in the smooth scrolling I’ve been seeking. I also finally got blur working, and all it took was a drag and drop in the Storyboard. All the other tutorials I found showed me how to do it with code, so I was never aware of the object until I found this tutorial today….

I’ve now moved the working tilting text code into a new, official TextScroll project and will begin building the full app around this new ScrollLabel. Current problems I’m having are getting the Scrollview/Blur to resize with the font size, and getting the text to begin offscreen. I’m very glad to have gotten past two major hurdles and hope to have tangible improvements to TextScroll soon!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s