2012-03-06 18 views
0

你好,我有我加入這裏的sharedapplciation視圖的問題是我如何加入的觀點:奇怪行爲的TabBar添加視圖sharedapplication

if (!thingLocator) { 
    thingLocator = [[AWThingLocatorController alloc] init]; 
} 
//show the view 
[[[UIApplication sharedApplication] keyWindow] addSubview:thingLocator.view]; 

,它給我的是這樣的結果:

Result of adding the view

正如你所看到的頂部和視圖的底部越來越切,THX提前

+0

從來沒有與該控制器一起工作,但可以更改它的框架嗎?因爲現在它看起來像是在狀態欄和標籤欄之間的空間中居中 – Novarg 2012-03-06 22:37:00

回答

0

因此,這裏是我科幻x它看起來是在(0,0)處繪製視圖並忽略狀態欄...

-(void)viewWillAppear:(BOOL)animated{ 
    [super viewWillAppear:animated]; 
    self.view.frame = [[UIScreen mainScreen] applicationFrame]; 
}