Group Group Group Group Group Group Group Group Group Forums

Video Tutorial: Introducing Custom Controls Part 6: Control Animation

Learn how to sprinkle a little bit of animation magic onto your three ring custom control.

This is a companion discussion topic for the original entry at

Converting to Swift 3 shows the following error message: Cannot express tuple conversion ‘(UIColor, (key: RingIndex, value: RingLayer))’ to '(UIColor, (RingIndex, RingLayer))'

for (color, (index, ring)) in zip([UIColor.hrPinkColor, UIColor.hrGreenColor, UIColor.hrBlueColor], rings) {
  setColorForRing(index, color: color)
  ring.value = 0.0

Hi @fschnek,

I think the problem is that the migrator has added labels to one of the tuples but not the other. Without seeing the rest of the code, I would suggest updating the beginning of the line to the following (assuming it compiles…):

for (color, (key: index, value: ring)) in zip...

Not overly convinced that’ll work. If it doesn’t can you paste the definition of rings and I’ll try to help out.


Hi @samdavies,

Thanks for replying! Yes, it did the trick!


1 Like

Awesome @fschnek! Glad it worked :slight_smile: