Search Results

Search found 15866 results on 635 pages for 'iphone 4g'.

Page 219/635 | < Previous Page | 215 216 217 218 219 220 221 222 223 224 225 226  | Next Page >

  • SQLite3 database doesn't actually insert data - iPhone

    - by user334934
    I'm trying to add a new entry into my database, but it's not working. There are no errors thrown, and the code that is supposed to be executed after the insertion runs, meaning there are no errors with the query. But still, nothing is added to the database. I've tried both prepared statements and the simpler sqlite3_exec and it's the same result. I know my database is being loaded because the info for the tableview (and subsequent tableviews) are loaded from the database. The connection isn't the problem. Also, the log of the sqlite3_last_insert_rowid(db) returns the correct number for the next row. But still, the information is not saved. Here's my code: db = [Database openDatabase]; NSString *query = [NSString stringWithFormat:@"INSERT INTO lists (name) VALUES('%@')", newField.text]; NSLog(@"Query: %@",query); sqlite3_stmt *statement; if (sqlite3_prepare_v2(db, [query UTF8String], -1, &statement, nil) == SQLITE_OK) { if(sqlite3_step(statement) == SQLITE_DONE){ NSLog(@"You created a new list!"); int newListId = sqlite3_last_insert_rowid(db); MyList *newList = [[MyList alloc] initWithName:newField.text idNumber:[NSNumber numberWithInt:newListId]]; [self.listArray addObject:newList]; [newList release]; [self.tableView reloadData]; sqlite3_finalize(statement); } else { NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(db)); } } [Database closeDatabase:db]; Again, no errors have been thrown. The prepare and step statements return SQLITE_OK and SQLITE_DONE respectively, yet nothing happens. Any help is appreciated!

    Read the article

  • iPhone App Store Screenshot Order

    - by David L
    In iTunes Connect, the first screenshot (on left) is not showing up as the first screenshot in the App Store. In one case the 3rd screenshot in iTunes Connect shows up 1st on the App Store and in another case the 4th screenshot is 1st on the App Store. Does anyone know how to specify the order of images? I found this question, that says the 1st screenshot in iTunes Connect should be 1st on the App Store, but that is not the case for my 2 apps. iTunes connect screenshot order

    Read the article

  • Display different iphone views depending on logged in status

    - by user330936
    I want to display a login view to my users if they are not logged in and the main view if they are. In my header file I define a variable to hold the logged in status #define loggedIn 0 I figure I should then reference this in the initWithNibName method and then decide which nib to load. Is the right way of doing it? If so can someone help me out with the exact code? Thanks for any help

    Read the article

  • port an iOS (iPhone) app to mac?

    - by William Jockusch
    Is there a preferred way to go about this? The app in question is not too large . . . single-player game that I wrote over the course of a couple of months. EDIT: I should add that I have no experience with mac development . . . outside of what comes naturally with being an iOS developer. EDIT: Classes heavily used in the game: subclasses of NSObject, UIView, and UIViewController. I don't know much about NSView, but I'm pretty sure all the UIView stuff will work in that class. Also some use of UITableViewController. I do also have Game Center, but I can leave that part out for now. There is no multi-touch.

    Read the article

  • iPhone SDK: How to add multiple labels to table cell?

    - by iPhone Developer
    I am trying to create a custom table cell that conveys these data fields. a.) Name b.) Address1 c.) Address2 d.) Phone In the table cell these fields should appear centered one after another. Another requirement is that each of those fields be a different font and color. For that reason, I was thinking of creating labels and attaching them to the cell but I haven't had much luck getting this working. My question is, can this be done? If so, what is the general approach to follow? Any pointers or links to examples greatly appreciated.

    Read the article

  • EXC_BAD_ACCESS when returning a CGRect in iPhone

    - by pabloruiz55
    I have a class which must return a CGRect from one of its methods: -(CGRect)myRect { CGRect rect = CGRectMake(self.mySprite.position.x,self.mySprite.position.y,self.mySprite.textureRect.size.width, self.mySprite.textureRect.size.height); return rect; } I get an exc_bad_access as soon as i try to access the mySprite ivar. Thing is if i call it, the instance variable mySprite is full of garbage. BUT if i change the function to return void, self.mySprite does contain the correct data. -(void)myRect { CGRect rect = CGRectMake(self.mySprite.position.x,self.mySprite.position.y,self.mySprite.textureRect.size.width, self.mySprite.textureRect.size.height); return rect; } that does not crash when accessing mySprite...

    Read the article

  • iphone xcode sqlite3_open remote host

    - by cicana
    Hi, i try to get a connection my server, with the sqlite3_open command! my question...is it possible to that? i got the following code... // Get the path to the documents directory and append the databaseName databaseName = @"AnimalDatabase.sql"; NSString *serverpath = @"http://localhost/app/"; databasePath = [serverpath stringByAppendingPathComponent:databaseName]; and then this here -(void) readAnimalsFromDatabase { // Setup the database object sqlite3 *database; // Init the animals Array animals = [[NSMutableArray alloc] init]; // Open the database from the users filessytem if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { // Setup the SQL Statement and compile it for faster access const char *sqlStatement = "select * from animals"; sqlite3_stmt *compiledStatement; if(sqlite3_prepare_v2(database, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) { // Loop through the results and add them to the feeds array while(sqlite3_step(compiledStatement) == SQLITE_ROW) { // Read the data from the result row NSString *aName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)]; NSString *aDescription = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)]; NSString *aImageUrl = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)]; // Create a new animal object with the data from the database Animal *animal = [[Animal alloc] initWithName:aName description:aDescription url:aImageUrl]; // Add the animal object to the animals Array [animals addObject:animal]; [animal release]; } } // Release the compiled statement from memory sqlite3_finalize(compiledStatement); } sqlite3_close(database); } any suggestion??

    Read the article

  • prevent navigationbaritem from animating in iphone

    - by pabloruiz55
    I have a navigation bar which i push 2 navigationBarIems without animation (animate:NO). I am animating the transition from views, so i don't want those items to animate atomatically. The problem is that when i touch the button from the bar to go to the previous view in the stack, it DOES get animated. How can i change that behaviour?

    Read the article

  • use system icon in iPhone

    - by user262325
    Hello everyone I hope to use the MAC OS's icons at http://oleb.net/wordpress/wp-content/media/apple-symbols-font-glyphs-table.png how can I access these icons, export them from MAC system to png files or dynamically access them in cocoa codes ? Welcome any commnent. Thank interdev

    Read the article

  • iPhone email PDF refresh

    - by skynate
    I email out daily sales reports via SQL Server Reporting Services. However, a few users receive on iPhones and the reports don't reload when a new one comes in. It thinks it is the same file as the previous day's report. Is there a way to clear the cache or force a reload?

    Read the article

  • "pay if you want to" using in app purchases (iphone)

    - by Jonathan
    I realise that you can't use in app purchases for real things. But does an in app purchase actually have to give extra functionality in the app. Can it be used to have optional paying? I've made an app that really should be free but I'd like to make a little money even if it's only one 59p. So could I have an in app purchase which users can click to pay if they want to. it might sound stupid but I'm betting there is at least one person who would becase they are nice :)

    Read the article

< Previous Page | 215 216 217 218 219 220 221 222 223 224 225 226  | Next Page >