如何使用uiscrollview滚动uiwebview

问题描述:

我有一个UIScrollView的UIWebView。我使用一些js文件来绘制一些图形,比如时间值发生变化时会更新。如何使用uiscrollview滚动uiwebview

的问题

我不是能当个熄灭屏幕的滚动。

我是IOS开发新手,请帮助我。

预先感谢

该数据库可由于多种原因被锁定:

  • 多个查询运行
  • 多个线程运行
  • 打开数据库多次

检查你的代码,看看你是否关闭了da的连接tabase sqlite3_close()。在完成每个SQL语句后,一个好主意也可以使用sqlite3_finalize()

所以尽量尝试符合所有sqlite3_open()sqlite3_close()sqlite3_prepare()(如果你正在使用它)与sqlite3_finalize()

After Completion the QUERY, You need to close transaction. 

Here's the sample code for you... 

// Get the documents directory 
    dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 

    docsDir = [dirPaths objectAtIndex:0]; 

// Build the path to the database file 
    databasePath = [[NSString alloc] initWithString: [docsDir stringByAppendingPathComponent: @"YOURDB.db"]]; 

const char *dbpath = [databasePath UTF8String]; 

if (sqlite3_open(dbpath, &DB) == SQLITE_OK) 

    { 

     NSString *query=[NSString stringWithFormat:@"insert into studentDetails (NAME,Email,adressL1,adressL2,phone,landline,department,DoB,fatherName) values (\"%@\",\"%@\",\"%@\",\"%@\",\"%@\",\"%@\",\"%@\",\"%@\",\"%@\")", 
             name.text, 
             email.text, 
             addressLine1.text, 
             addressLine2.text, 
             phone.text, 
             Landline.text, 
             Department.text, 
             DoB.text, 
             fname.text]; 



      const char *insert_stmt = [insertSQL UTF8String]; 



      sqlite3_prepare_v2(YOURDB, insert_stmt, -1, &statement, NULL); 

      if (sqlite3_step(statement) == SQLITE_DONE) 

      { 

       NSLog(@" Successfully added"); 



      } else { 

       NSLog(@" Failed added"); 

       NSLog(@"Error %s",sqlite3_errmsg(ExplorejaipurDB)); 

      } 

     } 


     sqlite3_finalize(statement); 

     sqlite3_close(YOURDB); 

    }