I have 42 custom button on one View. How can I by pressing any of them edit of the created buttons that i want.
int a=0; int b=1; int otstup=10; for (int i=1; i<=42; i++) { CGRect frameBtn = CGRectMake(a+60+otstup, b+otstup, 45, 45); UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; [button setFrame:frameBtn]; [button setBackgroundImage:[UIImage imageNamed:@"EmptyCoin.png"] forState:UIControlStateNormal]; [button addTarget:self action:@selector(pressBtn:) forControlEvents:UIControlEventTouchUpInside]; [button setTag:i]; [self.view addSubview:button]; a=a+50; if (i%7 == 0) { a=0; b=b+45; } }