아래 그림의 목적을 달성하는 방법 (연락처 정보보기 및 문의보기)은 코드를 작성하지 않고도 어떤 제안이라도 좋을 것입니다.2 UIViewController에서 한 번만보기
이미지 :
아래 그림의 목적을 달성하는 방법 (연락처 정보보기 및 문의보기)은 코드를 작성하지 않고도 어떤 제안이라도 좋을 것입니다.2 UIViewController에서 한 번만보기
이미지 :
버튼 컨트롤러 바로 아래에 두 개의보기가 서로 겹치고 탭이 수신되면 다른 하나를 숨긴다 ... 꽤 단순하지만 실제로 이것이 도움이되기를 바랍니다.
self.contactInfoView = [[UIView alloc]init];//whatever you need
self.enquiryView = [[UIView alloc]init];//same here, do whatever you need
//customize you views
UIButton *contactInfoButton = [UIButton buttonWithType:UIButtonTypeCustom];
UIButton *enquiryButton = [UIButton buttonWithType:UIButtonTypeCustom];
//customize the buttons
[contactInfoButton addTarget:self action:@selector(showContactView) forControlEvents:UIControlEventTouchUpInside];
[enquiryButton addTarget:self action:@selector(showEnquiryView) forControlEvents:UIControlEventTouchUpInside];
을 다음 뷰를 보여주기 위해이 방법을 : 그런
뭔가 작동합니다. 간단한 등이 될 수 :
-(void)showContactView {
self.enquiryView.hidden = YES;
self.contactInfoView.hidden = NO;
}
그에 따라 뷰를 제거/숨기기/표시 또는 추가,이 버튼을 탭에
희망이 도움 –