2011-04-07 61 views
0

我想在我的擴展UINavigationController中添加一個ADBannerView。 當旗幟負載我重新大小這樣的觀點:調整UINavigationController佈局問題

CGRect contentFrame = [[UIScreen mainScreen] applicationFrame]; 
banner.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50; 
bannerHeight = banner.bounds.size.height; 

self.view.frame = CGRectMake(self.view.bounds.origin.x, 
            (self.view.bounds.origin.y), 
            self.view.bounds.size.width, 
            contentFrame.size.height - (bannerHeight)); 

但UIView的是導航欄下部分牆根:here

任何想法有什麼不好?

感謝

[1]:

回答

0
self.view.frame = CGRectMake(self.view.bounds.origin.x, 
           (self.view.bounds.origin.y)+(bannerHeight), 
           self.view.bounds.size.width, 
           contentFrame.size.height - (bannerHeight)); 
+0

未解決:http://ploader.net/#d4406ed3611d9684f21cb163359bb01f.jpg – SQu 2011-04-07 11:09:28