在self.tabbarcontroller.view上添加子视图

时间:2013-12-12 11:10:05

标签: iphone objective-c uitabbarcontroller iboutlet addsubview

我在self.tabbarcontroller.view上添加了一个viewcontroller的视图。但在这种情况下,我无法更改子视图中的iboutlet框架。如何更改框架?请帮助..谢谢

- (void)addPopup
{
  popUpDataViewController = [[PopUpDataViewController alloc]init];
  popUpDataViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"popUpData"];

  popUpDataViewController.view.frame = self.view.frame;
  CGRect oldFrame = popUpDataViewController.view.frame;
  oldFrame.size.height = oldFrame.size.height + self.tabBarController.tabBar.frame.size.height;
  popUpDataViewController.view.frame = oldFrame;

  [self.tabBarController.view addSubview:popUpDataViewController.view];

}

0 个答案:

没有答案