See my post below your post..
a question about dynamic menu building in Swift.

I can't figure out how to, and the reply from firestarter hasn't helped much.