This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(NSArray*) openDatabaseWithSql:(NSString*)statement { | |
// Open the database. The database was prepared outside the application. | |
if (sqlite3_open([self.dbPath UTF8String], &database) == SQLITE_OK) { | |
// Get the primary key for all books. | |
const char *sql = [statement cStringUsingEncoding:NSUTF8StringEncoding]; | |
sqlite3_stmt *statement; | |
// Preparing a statement compiles the SQL query into a byte-code program in the SQLite library. | |
// The third parameter is either the length of the SQL string or -1 to read up to the first null terminator. | |
if (sqlite3_prepare_v2(database, sql, -1, &statement, NULL) == SQLITE_OK) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)checkAnswer:(int)answer { | |
if(rightAnswer==answer) | |
{ | |
//AudioServicesPlaySystemSound(_tweetSound); | |
score++; | |
} | |
else { | |
//AudioServicesPlaySystemSound(_barkSound); | |
} | |
[self updateScore]; |
NewerOlder