Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to reuse already loaded header view in UITableView ios
    primarykey
    data
    text
    <p>I am trying to use google ads on <code>- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section</code> , </p> <p>Actually i need to use Threading to show the ads without threading the google ads crashing the app. </p> <p>In each section of a UITableView after 20 cells i want to show the ads. </p> <p>But my problem is every time it taking time to reload the ads when i scroll up and down for example if I am in first section the ads loading after i move to section the section ads loading when i go back to first section again the old ads view get removed and the new one is loading. </p> <p>So what i want here is i want to reuse the old ads view for the first section only first time ads should be load every time it should reuse the old ads view. Here is my code inside <code>viewForHeaderInSection</code> </p> <pre><code> [[NSOperationQueue mainQueue] addOperationWithBlock:^{ // Create a view of the standard size at the top of the screen. // Available AdSize constants are explained in GADAdSize.h. adBanner_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; // Specify the ad's "unit identifier." This is your AdMob Publisher ID. adBanner_.adUnitID = @"a15120dbc353a5f"; // Let the runtime know which UIViewController to restore after taking // the user wherever the ad goes and add it to the view hierarchy. adBanner_.rootViewController = self; // Initiate a generic request to load it with an ad. [adBanner_ loadRequest:[GADRequest request]]; }]; return adBanner_; </code></pre> <p>please any body tell me how to reuse the First, second and third ... sections again if that section view already loaded.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload