Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Animate Button

I'm having trouble figuring out how to change the alpha of a button in a sequence. Here is what I'm trying to do.

I have set up a button with its alpha set to 0.5. I program the alpha to change to 1.0. The user presses the button that the alpha has changed and then the next random button's alpha changes and so on. I'm catching which buttons alpha has changed. I'm trying to get them to highlight in order there alpha changed using a "for in" with a "switch" statement. But what I'm getting is they all light up at one time instead of one at a time. I've tried using animation with delay but nothing seems to work. Any ideas?

Thanks, Bryan

1 Answer

Bryan, Could you post your code? So i can try to help you.