2012-02-09 80 views
0

在按下Mainviewcontroller按鈕時,處理最近這麼多天的這個問題,它會播放音頻文件,並在View的底部顯示ViewUIToolbar狀態欄和視圖之間的差距

UIViewUIImageUIText

我的問題是,當View加載它顯示status bar和加載view,並在從UIToolbar壓在view它提出Modalviewcontrollerinfobutton當這Modalviewcontroller被駁回差距回到View它顯示status barView之間的差距相同。

- (void)displayviewsAction:(id)sender 
{ 

self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]autorelease]; 

self.view.superview.frame = CGRectMake(0, 0, 320, 480); 

PageOneViewController *viewController = [[[PageOneViewController alloc] init]autorelease]; 

[self.view addSubview:viewController.view]; 

[self.view addSubview:toolbar]; 

} 

請任何人都知道如何解決這個問題。感謝你的幫助。

謝謝

+0

video..or screenshots? – Shubhank 2012-02-09 16:44:10

回答

0

掙扎2天后,得到了我的問題的解決方案。這很簡單。

我做了這些改變

- (void)displayviewsAction:(id)sender 
{ 
//self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]]autorelease]; 

//self.view.superview.frame = CGRectMake(0, 0, 320, 480); 

PageOneViewController *viewController = [[[PageOneViewController alloc] init]autorelease]; 

viewController.view.frame = CGRectMake(0, 0, 320, 480); 

[self.view addSubview:viewController.view]; 

[self.view addSubview:toolbar]; 

}

現在有沒有間隙。它工作正常。