Note that there are some explanatory texts on larger screens.

plurals
  1. POReload UIWebView
    text
    copied!<p>I have UIWebView for displaying articles. I stored touch location coordinates in database and displaying buttons. After i delete the coordinates from database the buttons are still showing. when i go back from UIWebView and come to back the button's are removing. I need to reload or refresh after delete the button. I used Reload, but after delete it shows white page.</p> <pre><code>-(void)recycle:(id)sender { int new_delete_tag; NSArray *coorpaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *coordocumentsDirectory = [coorpaths objectAtIndex:0]; NSLog(@"docs dir is %@", coordocumentsDirectory); NSString *coorpath = [coordocumentsDirectory stringByAppendingPathComponent:@"db.sqlite"]; NSLog(@"filepath %@",coorpath); if (sqlite3_open([coorpath UTF8String], &amp;database) == SQLITE_OK) { const char *sql = [[NSString stringWithFormat: @"SELECT xcoor,ycoor,artt_id,button_tag FROM touch where button_tag = '%d'", webbuttontag]cStringUsingEncoding:NSUTF8StringEncoding]; NSLog(@"getmainsql is %s",sql); sqlite3_stmt *statement; if (sqlite3_prepare_v2(database, sql, -1, &amp;statement, NULL) == SQLITE_OK) { // We "step" through the results - once for each row. while (sqlite3_step(statement) == SQLITE_ROW) { xfr=sqlite3_column_double(statement, 0); yfr=sqlite3_column_double(statement, 1); art_Idr = sqlite3_column_int(statement, 2); new_delete_tag = sqlite3_column_int(statement, 3); NSLog(@"xfr is %f",xfr); NSLog(@"yfr is %f",yfr); // NSLog(@"zc is %@",zc); NSLog(@"art_Idr is %ld",(long)art_Idr); NSLog(@"new_delete_tag is %d",new_delete_tag); } } } if(xfr &amp;&amp; yfr &amp;&amp; new_delete_tag &amp;&amp; art_Idr){ NSLog(@"error"); NSLog(@"xfr is %f",xfr); NSLog(@"yfr is %f",yfr); NSLog(@"art_idd is %ld",(long)art_Idr); sqlite3_stmt *addStmt; const char *sqlDelete = [[NSString stringWithFormat:@"delete FROM touch where xcoor = %f AND ycoor = %f AND button_tag = '%d' AND artt_id = '%@'",xfr,yfr,new_delete_tag,artID] cStringUsingEncoding:NSUTF8StringEncoding]; NSLog(@"sql delete is %s",sqlDelete); if(sqlite3_prepare_v2(database, sqlDelete, -1, &amp;addStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while deleting coor from touch . '%s'", sqlite3_errmsg(database)); NSLog(@"%s error finalizing %s", __FUNCTION__, sqlite3_errmsg(database)); if(SQLITE_DONE != sqlite3_step(addStmt)) NSAssert1(0, @"Error while deleting coor from touch . '%s'", sqlite3_errmsg(database)); [txtview removeFromSuperview]; } // Reload here [wbCont reload]; } </code></pre>
 

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