How to make IBOutlets out of an array of objects?

后端 未结 5 1383
南旧
南旧 2020-12-30 20:13

I want to make an array with a bunch of UIImageViews I have in Interface Builder. Instead of having 20 or 30

IBOutlet UIImageView *img1;

a

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 20:42

    I'm a little late here but it may be easier to set the tag property of each ImageView in IB, then access them like [some_superview viewWithTag:tag] rather than keep a separate handle to each one.

提交回复
热议问题