iphone - webview delegate method is not fired in background process -


i developing 1 application.in using static library.and run app in background using below code

   -(ibaction)sendkeyvaluepair:(id)sender   {     [nsthread detachnewthreadselector:@selector(startthebackgroundjob) totarget:self   withobject:nil]; }  -(void)startthebackgroundjob  { nsautoreleasepool *pool = [[nsautoreleasepool alloc] init];  //create object library class , , release object.  [pool release];  } 

and int library class created 1 webview object , add webview main class below

           web=[[uiwebview alloc]init];             //web.delegate=self;             web.frame=cgrectmake(1, 1, 100,100);             [web loadhtmlstring:html_str baseurl:nil];             [main_view.view addsubview:web];             [html_str release];             [web release]; 

here problem if set delegate self app crashing.and if didn't set delegate methods not firing.and delegate methods implemented in library class only.i want set delegate self , run delegate methods in library class.how one.

add this

    [web setdelegate:your library class name instance]; 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -