In my opinion you are overcomplicating yourself, and limiting future possibilities. If i were you, i would have a grid of UIViews or UIImageViews placed in an array. (You can do it programmatically or with the IB). (You can add the edges by modifying the border property in the view layer)
Then you can do all sort of things by setting their background colors independently, color evens, color odds, random all, anything you want since all you have to do is cycle through the array setting the colors accordingly per beat.
For the beats part is way more complicated than it seems. check this question, it offers a lot of tips on "music information retrieval".