2016-11-10 5 views
0

버튼을 클릭하면 크기가 증가한보기 (xib ie VPProcessNewJobDataVC)를 볼 수 없었습니다. 우선 순위를 시도했는데 layoutIfNeeded와 all . 나는 동일한 VPProcessNewJobDataVC.m 파일의 버튼 동작을 기록한버튼을 클릭 할 때 xib보기 크기를 늘릴 수 없습니다.

이 방법은 하나 개의 클래스 :

-(void)menuItemQARequest: (id) sender { 

    vpaController=[[VPProcessNewJobDataVC alloc] initWithNibName:@"VPProcessNewJobDataVC" bundle:[NSBundle mainBundle]]; 
    vpaController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; 
    vpaController.delegate=self; 
    vpaController.modalPresentationStyle = UIModalPresentationFormSheet; 
    //[vpaController.view setTranslatesAutoresizingMaskIntoConstraints:NO]; 
    vpaController.preferredContentSize=CGSizeMake(600, 400); 

    NSLog(@"View frame is %@", NSStringFromCGRect(vpaController.view.frame)); 
    [self.jobsSplitVC presentViewController:vpaController animated:YES completion:nil]; 
} 

이 방법 XIB 클래스이다 크기 조정 및 재 레이아웃 뷰

-(IBAction)okBtnAction:(id)sender { 

    self.tableView.hidden=NO; 
    CGRect theFrame = self.view.frame; 
    [self.view setFrame:CGRectMake(2.0, 3.0, 800.0, 1000.0)]; 
    [self.view addSubview:self.tableView]; 
} 
+0

더 자세히 설명해주세요. 버튼을 클릭하면 원하는대로 다음 화면을 볼 수 없습니다. –

+0

이것의 목적은 무엇입니까? – KKRocks

+0

증가시키고 자하는 뷰와 버튼을 클릭 한 뷰 컨트롤러를 알려주십시오. –

답변

0

레이아웃주기를 호출해야합니다. 프레임의 크기를 조정 한 후 [self layoutIfNeeded]으로 전화 해보세요.