iphone

Internationalization and Validation

My app has a registration page for new users and I'm trying to carefully support as many languages and locales as possible. One of the rules for their desired username is that it must be alphanumeric, but when I type Japanese characters into that field it never passes validation. Do you know of any good resources on best-practices for ...

How do I support my iOS 3.1.2 users now that I've upgraded to Xcode 3.2.3?

I recently released a new version of my iPhone app that was built for iOS 3.1.2. Now I want to release a very small bugfix update, but in the time between my last release and now, I've upgraded Xcode to 3.2.3 and upgraded my test iPhone to 4.0. Since these are very simple changes, I want my iOS 3.1.2 users to be able to get these fixes...

Drawing rich text on iPhone using CoreGraphics

I'm showing a Twitter feed in a UITableView on the iPhone. Scrolling performance is an issue, so I'm doing my own drawing in table cells -- that is, cells have no subviews, and they draw their content with drawRect:. In drawRect: cells draw tweets' text using the drawAtPoint:forWidth:withFont:minFontSize:actualFontSize:lineBreakMode:ba...

iPhone SDK Tab Bar Orientation Change Question

Can you change orientation in an application using a tab bar. I.E. I have three tabs. Tab 1 is Portrait, Tab 2 I would like in Landscape, and tab 3 portrate again. Is this possible? Thank you for your efforts in advance. ...

Loading all the values of an attribute of core data to an array

I have an attribute "term" which is a NSString in my core data "Event". When the table view is loaded I want all the values of "name" to be loaded to an array. I used the code - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath { Event *event = nil; event = [fetchedResultsController objectA...

Localizing Dates From Remote Server

I'm storing all dates on my server as UTC. I fetch this data to my app via JSON and am successfully parsing these dates. How should I localize the dates in Objective C? ...

iPhone private API of canAuthenticateAgainstProtectionSpace and didReceiveAuthenticationChallenge

Hi, everyone. I want to ask a questions about the canAuthenticateAgainstProtectionSpace and ddidReceiveAuthenticationChallenge. Are they private API iPhone application? If yes, how can I modify it? And after I modify the private API of iPhone, will the iPhone reject my application? If no, where should I put the modified code? I used ...

How to implement semi-randomized level in iPhone game?

I want to create a game with a level structure similar to iCopter or Canabalt, where each level has a randomized floor (and roof), but the height of the floor is never impossible to reach from the previous one. I am also unsure on how to continually increase difficulty. I have searched far and wide for a tutorial or something like that, ...

what do mean by "delegate" in iPhone application

Hi, all. I usually read a word 'delegate' in the apple document and their library book. What exactly meaning about this word? Any special meaning in iPhone? Thank you very much. ...

how to insert new row in exisitng databse using sqlite3.0 for iphone

this is my default table having 3 rows now i want to add 1 more row to ths database but i dont know the syntax 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 *compi...

UIToolbar with rounded corners

Hi! I want to display a UIToolbar with rounded corners on top, what would be the easiest way? the toolbar is not top-aligned on the window; it has a margin all around. Thanks! ...

Drawing Graphics on IPhone

I am having problem in drawing a rectangle or triangle on the touch gesture. Here is the code: -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:self]; // move the cannon to the touched location x = location.x; [...

Does iphone 4 have automatic data persistence?

I loaded some app projects that I had been developing using the iPhone 3.1.3 Simulator. Now I got the 4.0 package, and for some reason when I hit the home button of the simulator to go the home screen and then go back to the app, it's in the same position as I left it. Is this now standard? What if I don't want it to do this? I'd rat...

Access image from PhotoLibrary using UIImagepicker without User interaction?

Hi is it possible to access an image from the photolibrary without the user interaction? ...

Retain UIViewController or not in navigation stack

Hi, I have a scenario that I'm not sure whether to retain a view controller or not. Say I had ViewControllerOne. When a button was pressed, ViewControllerOne would push ViewControllerTwo in the navigation stack. ViewControllerTwo needs a reference to ViewControllerOne because it needs to access an ivar in that view controller. The quest...

iPHONE SDK- sqlite , how do i do an insert statement

Hi guys. i have a database that is in the documents directorys of the Application/iPhoneSimulator/3.2/Applications/etc/Documents I have this code under my method databaseName = @"database.sql"; NSArray *documentsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory.NSUserDomainMask,YES); NSString *documentsDir = [document...

Help with Triangle collision detection in Obj-C

I haven't taken any advanced math courses or anything (I'm still in high school) and I just don't really understand all the triangle collision systems online. I have two triangular objects in a 2D space. How should I write Obj-C code so that a collision/intersection between the two can be detected? I'm stumped. ...

common NSConnection for various data proccessing from web server in iphone

Hi friends, How to have common NSConnection for various data proccessing from web server in iphone. if possible can i have code for it Regards, sathish ...

How to build a static library for both iPhone OS 3 and OS 4?

I created a .a lib file and it was built under iPhone OS 3.0 (in XCode 3.2.2). Now I found that it doesn't work on OS 4. I was using the lipo command to build the .a file for both simulator version and device version: lipo -create libdevice.a libsimulator.a -output libcombined.a Now I created another .a file under iPhone OS 4.0 (in XC...

iPhone / iPad user profile tracking

My iphone app downloads user specific data from our web server. How can I identify a unique user/device? cookie? ip address? or do I need them to register first? What are some issues I need to be aware of? best practices? ...