objective c - i am not able to increase the xib view size on button click in it, -
on clicking of button not able see view(xib ie vpprocessnewjobdatavc ) increased in size , have been tried priorities,layoutifneeded , . have written button action in same vpprocessnewjobdatavc.m file
this method in 1 class:
-(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 %@", nsstringfromcgrect(vpacontroller.view.frame)); [self.jobssplitvc presentviewcontroller:vpacontroller animated:yes completion:nil]; }
this method in xib class:
-(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]; }
for resizing , relayout view , layout cycle must call . try calling [self layoutifneeded]
after resize frame .
Comments
Post a Comment