ios - Why does iAd still load data after it has been removed from it's superview, and can this be stopped? -


i have small app iads, , allow people pay upgrade.

the iad setup in application's nib. check purchase status in viewdidload method of main uiviewcontroller, , call following methods on adbannerview outlet member:

[adbanner removefromsuperview]; adbanner = nil; 

unfortunately if watch device's data usage, data still downloaded ad.

is there way kill iad doesn't load data?

i know create iad view programatically , add if user has not purchased product, product working nicely nib , i'd rather not change reason.

update:

in .h file have:

iboutlet adbannerview* adbanner; 

in .m file in - (void)viewdidload method have:

if (purchased) {     [adbanner removefromsuperview];     adbanner.delegate = nil;     adbanner = nil; } 

i hope enough remove iad before gets chance download data.

alas, isn't enough prevent view downloading data. suspect there delay in being dealloc'd @ time – but don't know how this, short of calling dealloc itself.

does know of better/correct way destroy object loaded via xib , assigned iboutlet?

i suspect don't release ad banner.

did autorelease adbanner when creating it? if didn't, code showing here doesn't release banner.

most likely, didn't autorelease , it's retained. need is:

[adbanner release];  

instead of

adbanner = nil; 

which way useless since sets pointer adbanner nil doesn't release object @ all.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -