iphone - Check if delegate still exists before calling respondsToSelector -
i have made uiview
sub class deal iads , admob. view controller sub class delegate , works ok. however, view controller disappears before ad has been fetched. resolve set delegate
nil
in view controller's dealloc
implementation.
the problem have respondstoselector:
method ran @ same time view controller getting deallocated. causes crash. know how may rearrange this?
the ad view on 10 different view controllers 1 place create ad code.
many thanks
one easy way retaining view until had chance set delegate nil, , release it. can ensure object still alive , prevent crashes.
Comments
Post a Comment