0

UIViewController我知道在另一个中显示 a 是不明智的,UIViewController但我不知道该怎么做。我有一个 3D 视图控制器 ( ThreeDViewController),它显示一个 3D 对象并允许用户旋转和放大对象。我希望能够对ThreeDViewController仍然允许在我的SideBySideViewController.

  self.ViewInstance = [[ThreeDViewController alloc]init];
  [self.view addSubview:self.ViewInstance.view];

这就是我到目前为止所拥有的,但它只导入了它,UIViewController所以它占据了整个屏幕,我想要一个固定大小的盒子。并且initWithFrame不起作用。

谢谢!

4

1 回答 1

0
float scaleFactor = 0.5;
    CGRect temp = CGRectMake(self.ViewInstance.view.frame.origin.x, self.ViewInstance.view.frame.origin.y,self.ViewInstance.view.frame.size.width*scaleFactor, self.ViewInstance.view.frame.size.height*scaleFactor);
    self.ViewInstance.view.frame = temp;
于 2012-07-03T16:51:09.463 回答