0
레이블 목록이있는 방법은 어떨까요? 둥근 사각형 단추를 누르면 위에있는 UILabel이 목록에서 임의로 변경됩니다.iPhone 바꾸기 레이블
레이블 목록이있는 방법은 어떨까요? 둥근 사각형 단추를 누르면 위에있는 UILabel이 목록에서 임의로 변경됩니다.iPhone 바꾸기 레이블
당신이 설정 라벨을 이미했습니다과 인터페이스에서 현재 레이블에 인덱스를 정의 가정, 당신이 뭔가를 할 수 있습니다 :
NSArray *labels = [NSArray arrayWithObjects:label1, label2, label3, nil];
int currentLabel = 0;
-(void)onButtonPress:(id)sender {
[[labels objectAtIndex:currentLabel++] removeFromSuperview];
if (currentLabel == [labels count])
currentLabel = 0;
[self addSubview:[labels objectAtIndex:currentLabel]];
}