Create a for loop to add 39 buttons to an array

前端 未结 5 770
情书的邮戳
情书的邮戳 2021-01-02 11:07

I have 39 different UIButton variables in my .h file, but I would like to add each of them to an array without having to type out the same thing 39 times.

Is there a

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-02 11:41

    for(int i=1; i

    Edit: after re-reading your question, this might not be what you're asking. I thought you wanted to create a bunch of instances of similar classes.

提交回复
热议问题