Ios UIView控制器上的视图帧更改
我的项目中有Ios UIView控制器上的视图帧更改,ios,uiview,delegates,uitableview,presentviewcontroller,Ios,Uiview,Delegates,Uitableview,Presentviewcontroller,我的项目中有UIVIewController和UITableViewController。我在ui按钮上演示UIVIewController,在第一个UIVIewController中操作,并使用协议方法从表视图中选择数据以在我的第一个UIVIewController中显示 tableViewController *objPlanTable = [self.storyboard instantiateViewControllerWithIdentifier:@"presentTableView
UIVIewController
和UITableViewController
。我在ui按钮上演示UIVIewController
,在第一个UIVIewController
中操作,并使用协议方法从表视图中选择数据以在我的第一个UIVIewController
中显示
tableViewController *objPlanTable = [self.storyboard instantiateViewControllerWithIdentifier:@"presentTableView"];
objPlanTable.myDelegate = self;
objPlanTable.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:objPlanTable animated:YES completion:nil];
这是我的UITableViewDelegate
方法
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *aCell = [tableView cellForRowAtIndexPath:indexPath];
if([self.myDelegate respondsToSelector:@selector(selectPlan:)])
{
[self.myDelegate selectPlan:aCell.textLabel.text];
[self dismissViewControllerAnimated:YES completion:NULL];
}
if ([self.myDelegate respondsToSelector:@selector(dismissViewControllerAnimated:completion:)])
{
[self.myDelegate backgroundChanger];
}
}
但完成后,它会更改我的ui视图
包含ui按钮的高度。此UIVIew
是UIViewController
>UIVIew
>uicrollview
>UIVIew
如何保持我的此UIView与之前的状态UITableViewController
我在StackOverFlow上发现了类似的问题,但对于pushUIViewController
&没有帮助
如果我做错了什么,请纠正我,任何想法/帮助都将不胜感激。完成后,在协议方法中显示的UIViewController
之前,将我的ui设置为原始状态
替代方法是推送而不是显示UIViewController
新更改-(void)selectPlan:(NSString*)strPlanName Added-(void)selectPlan:(NSString*)strPlanName:(int)interfaceFlag-(void)viewdide出现:(BOOL)已设置动画{if(final==1){my original frame.}}}但它在延迟一秒钟后仍会反射,这对ui不好。你知道吗?