2011-04-18 51 views
0

我正在使用表格視圖單元格和iADBanner.when的項目上工作,當我滾動表格並希望查看錶格的最後一個單元格時,它將位於iAdbanner後面。如何調整表格這樣我可以看到表格的最後一個單元格以及iADbanner。調整表格視圖

+0

調整幀。減少身高..這應該做到這一點 – visakh7 2011-04-18 09:57:49

回答

3

您必須設置表格的框架並將其高度設置爲當前高度減去iAd標語高度。

[tblView setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 410.0f)]; 

我假定你的iAd的橫幅高度爲50和(0,0)

1

你的表視圖原點這是非常簡單的,只需要爲表設置框。

0

由於廣告不會一直出現,因此您的表格視圖和iAd視圖應位於容器視圖內。所以每當有廣告顯示時:

- (void)bannerViewDidLoadAd:(ADBannerView *)banner { 
    //Set the iAdview frame according to Orientation 
    if(Want to show Ad) 
    //Add the iAdView to the bottom of container View, pushing the table View up 
    else 
    //Remove iAd from Container View. 
}