바 버튼을 두 드릴 때 두 개의 하위보기를 추가하려고합니다. 하지만 하위보기를 추가하면 정상적으로 작동하지만 하위보기를 제거하려고하면 작동하지 않습니다. 여기 바 버튼을 두 드릴 때 하위보기 제거
내가-(IBAction)showPopover:(id)sender{
UIView *popoverView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 100)];
UIView *popoverViewBackground = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1000)];
popoverView.alpha = 0.0;
popoverView.layer.cornerRadius = 2;
popoverView.layer.borderWidth = 0.1f;
popoverView.layer.backgroundColor = [UIColor whiteColor].CGColor;
popoverView.layer.masksToBounds = YES;
popoverViewBackground.layer.backgroundColor= [UIColor blackColor].CGColor;
if (popoverCount == 0) {
[self.view addSubview:popoverViewBackground];
[self.view addSubview:popoverView];
popoverCount = 1;
}else if (popoverCount ==1){
[popoverView removeFromSuperview];
[popoverViewBackground removeFromSuperview];
popoverCount = 0;
}
[popoverViewBackground setAlpha:0.5];
[popoverView setAlpha:1.0];
}
고맙습니다. Idon't가 그것을 생각하는 이유를 나는 모른다. – Jonathan
네, 할게요. stackoverflow가 받아 들일 수있게하자마자 P – Jonathan
마지막으로 한 가지만 신경 쓸 수 있을까요? rollover를 첨부하고 popoverview에 애니메이션을 롤업하는 방법이 있습니까? 구글 플러스가 앱에서하는 일처럼? – Jonathan