2012-07-03 83 views
0

實例我知道這是不明智的顯示在另一個UIViewController一個UIViewController但我不知道該怎麼做。我有一個3D視圖控制器(ThreeDViewController),顯示一個3D對象,並允許用戶旋轉並放大俯仰。我希望能夠對ThreeDViewController做一個小視圖,該視圖仍然允許我的SideBySideViewController進行交互。CGRectMake爲一個UIViewController

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

這是我到目前爲止,但只進口UIViewController所以它佔據了整個屏幕,和我想的是一組大小框。而initWithFrame不起作用。

謝謝!

回答

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;