iphone - How can I create an array of UIButtons/(UIImageViews) that appear after the last one was pressed -
i wasn't sure how search answer question figured try luck on here. to put in short, have uiview , created uibutton programmatically along uiimageview added button subview , happens is, when press on button, allows me add image , gets stored on button. so question is: once completed, how can make button/imageview appear in view, next first button (or after fills screen right, appear in 2nd row, 1st column) etc thank in advanced! you can use uicollectionview pointed out @bernahard harrer or use following code. code adds 2 buttons. in case, need more buttons or array of buttons, implement following code , calculate size of added button, height/width of button1 calculated adding button2 : #import "viewcontroller.h" @interface viewcontroller () @end @implementation viewcontroller - (void)viewdidload { [super viewdidload]; // additional setup after loading view, typically nib. [self addbuttons]; } - (void)didreceivememorywarning { [super...