0
페이지 스크롤로 두 개의 버튼을 만들었습니다. 이제 하나의 버튼을 클릭하여 다른 버튼을 볼 수 있습니다. 현재 버튼의 동작 방법을 수행 할 때 다른 버튼의 색인을 얻는 방법은 무엇입니까?페이지를 스크롤하는 동안 버튼 이벤트가 올바르게 작동하지 않습니다.
for (int i = 0 ; i < numberOfPages ; i++)
{
pageFrame = CGRectMake(i * scrollView.bounds.size.width, 0.0f, scrollView.bounds.size.width, 416) ;
btnSettingButton=[[UIButton alloc]initWithFrame:pageFrame ];
[ btnSettingButton setFrame:CGRectMake(i * (scrollView.bounds.size.width)+50, 260, 20, 20)];
btnSettingButton.tag=i;
[btnSettingButton setImage:[UIImage imageNamed:@"Settings Icon.png"] forState:UIControlStateNormal];
[scrollView addSubview:btnSettingButton];
[btnSettingButton setHidden:YES];
// [btnSettingButton release];
UIButton *btnCheckButton=[[UIButton alloc]initWithFrame:pageFrame ];
[ btnCheckButton setFrame:CGRectMake(i * (scrollView.bounds.size.width)+250, 260, 20, 20)];
[btnCheckButton setImage:[UIImage imageNamed:@"NO.png"] forState:UIControlStateNormal];
[btnCheckButton addTarget:self action:@selector(checkBoxClicked:) forControlEvents:UIControlEventTouchUpInside];
// [btnCheckButton addTarget:self action:@selector(changePage:) forControlEvents:UIControlEventTouchUpInside];
[scrollView addSubview:btnCheckButton];
[btnCheckButton release];