i loading video using avplayer lib using code
avurlasset *asset = [avurlasset urlassetwithurl:url options:nil]; nsarray *requestedkeys = [nsarray arraywithobjects:ktrackskey, kplayablekey, nil]; [asset loadvaluesasynchronouslyforkeys:requestedkeys completionhandler:^{ dispatch_async( dispatch_get_main_queue(), ^{ things
if enter view , go fast app crashes because try execute code inside after releasing objects use in it
is there way end request load values manually?
@ruchi
sorry adding answer can't comment yet , had change user.
but solution ended doing keeping boolean shows me if page still loaded.
on - (void)viewdidappear:(bool)animated
set self.loaded = yes;
and on -(void)viewwilldisappear:(bool)animated
set self.loaded = no;
so first thing on code check this
avurlasset *asset = [avurlasset urlassetwithurl:url options:nil]; nsarray *requestedkeys = [nsarray arraywithobjects:ktrackskey, kplayablekey, nil]; [asset loadvaluesasynchronouslyforkeys:requestedkeys completionhandler:^{ dispatch_async( dispatch_get_main_queue(), ^{ if (!self.loaded) return; things
hope helps too!