0
의 Obj-C에있는 NSMutableArray에 UILabel의 참조하는 방법 : 그래서내가 몇 가지 코드있어
int k = 0;
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
label = [[UILabel alloc] initWithFrame:CGRectMake(30*i, 30*j, 30, 30)];
[label setText:[NSString stringWithFormat:@"%d", filterTab[i][j]]];
[label setTextAlignment:UITextAlignmentCenter];
[label setFont:[UIFont systemFontOfSize:15]];
[label setTextColor:[UIColor grayColor]];
[label setBackgroundColor:[UIColor clearColor]];
[label setTag:k];
[array addObject:label];
[tableFilter addSubview:label];
k++;
}
}
을이 81 개 레이블을 만들고 및 배열에 볼을 모두 추가하고 난 버튼이있어 : DO를 언젠가는이 버튼에 행동이 있습니다. 이 작업은 tag = 80으로 선택한 라벨의 텍스트를 변경해야합니다.
어떻게하면됩니까?