2012-01-06 63 views
1

iPad Example導航欄上移,而從iPhone應用程序

的電影播放回來我使用下面的代碼顯示了MP4視頻中的iPhone應用程序:

enter code here 
NSString *embedHTML = @"\ 
<html><head>\ 
<style type=\"text/css\">\ 
body {\ 
background-color: transparent;\ 
color: white;\ 
}\ 
</style>\ 
</head><body style=\"margin:0\">\ 
<embed id=\"yt\" src=\"http://www.businessfactors.de/bfcms/images/stories/videos/defaultscreenvideos.mp4\" type=\"application/x-shockwave-mp4\" \ 
width=\"%0.0f\" height=\"%0.0f\"></embed>\ 
</body></html>"; 

webView = [[UIWebView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 412.0)]; 

[webView setOpaque:NO]; 
NSString *html = [NSString stringWithFormat:embedHTML, webView.frame.size.width, webView.frame.size.height]; 
[webView loadHTMLString:html baseURL:nil]; 

它的偉大工程。它也打開iphone應用程序的movieplayer點擊。 但是當我從電影播放器​​返回時,它會在導航欄上顯示一個空白區域,向下移動導航欄。

我已經在模擬器和iphone設備上試了它。

導航欄看起來是這樣的: iPad example

+0

您是否在爲navBar做些什麼?像定製它? – Zoleas 2012-01-06 10:07:14

+0

是的,我只是設置導航欄的色調...... – abhiTouchmagic 2012-01-09 07:53:33

+0

我認爲它不是錯誤的導航欄,而是使用導航欄的視圖。我建議檢查視圖的框架並確保它覆蓋設備的所有窗口(320x468)。 – 2012-01-09 08:15:20

回答

0

經歷過的東西,聽起來很相似,這是我的建議:

看一看的廈門國際銀行在Xcode中的視圖,並查找頁面屬性。檢查高度爲480,而不是460.

+0

我試過這種方式,但它仍然沒有工作........ – abhiTouchmagic 2012-01-09 13:09:49

+0

[self setWantsFullScreenLayout:YES]; ? – 2012-01-09 13:13:18