Что-то подобное должно работать:
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];
, а затем сделайте 2 метода для отображения представлений.Может быть просто, как:
-(void)showContactView {
self.enquiryView.hidden = YES;
self.contactInfoView.hidden = NO;
}
Надеюсь, это поможет