라디오 버튼 구현에 GSRadioButtonSetController를 사용하고 있습니다. 두 개의 버튼을 만들고 IBOutletCollection (UIButton) NSArray * buttonCollection에 포함 시켰습니다. 그런 다음 GSRadioButtonSetController가 포함되었습니다. h 및 GSRadioButtonSetController.m 파일을 내 프로젝트에 추가하십시오. 그럼 내있는 viewDidLoad에 나는GSRadioButtonSetController를 사용한 라디오 버튼 구현이 색상을 참조하여 상태를 변경하지 않습니다.
// Instantiate your GSRadioButtonSetController object
self.radioButtonSetController = [[GSRadioButtonSetController alloc] init];
// Set its delegate to your view controller
self.radioButtonSetController.delegate = self;
// Set its buttons property to an array of buttons that you've
// created previously.
self.radioButtonSetController.buttons = buttonCollection;
을 추가 한 후 나는
- (void)radioButtonSetController:(GSRadioButtonSetController *)controller
didSelectButtonAtIndex:(NSUInteger)selectedIndex
{
//implemetation
}
가 ....하여 deselcetd 상태에 대한 선택 상태와 제 2 하나 ... 버튼에 대한 견인 이미지가 있습니다 넣어 코드는