I have some string s that is locale specific (eg, 0.01 or 0,01). I want to convert this string to a NSDecimalNumber. From the examples I've seen thus far on the interwebs, this is accomplished by using an NSNumberFormatter a la:
NSString *s = @"0.07";
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
[formatter setForm...
What is the best way to load static data files containing game level maps on the iPhone? I have seen some use XML files, but that seems like overkill in my situation as the data files merely determine the layout of the game's level, ie where obstructions will go. Also, what project directory should they be stored in?
Thanks in advance...
I would like to do a transformation (rotation) to a UIImageView, I could just set the transform property of the view, but would setting the layer's transform make it faster? If so.. how can I achieve this?
assuming I have a UIImageView initialized with an image, can anyone help? would it be better have a UIVIew with a UIImageView in it?...
Is there a way using the iPhone SDK to get the same results as an HTTP POST or GET methods?
...
How do you add that little "X" button on the right side of a UITextField that clears the text? I can't find an attribute for adding this sub-control in Interface Builder in the iPhone OS 2.2 SDK.
Note: In the iPhone 3.0 SDK, you can do this in Interface Builder.
...
When an iPhone application manages its own preferences, rather than using a bundle, it seems to be common practice to style that view to mimic the System Preferences app: fields are grouped by light rectangles with rounded edges; titles and explanatory text are added to the space between.
What is best used to achieve this styling? My ...
I'm having a weird issue with a particular UITableView in my iPhone devel experience here. If you look at the following screenshot:
you'll notice a strike through going through the middle of the 'Jane Aba' cell.
Any idea what might be causing this odd graphic display? It's true for both the simulator and for the actual device runni...
I have a table view setup which currently, when being flickered up, has its sections flush up against right underneath the status bar, instead of flushing against the the navigation bar. I'm not sure if this is the proper behavior, but most applications have the Section Title flush properly below the navigation bar when it's slid into vi...
How does one read a data file in an iPhone project? For example, lets say I have a static file called "level.dat" that is structured as follows:
obstacles: 10
time: 100
obstacle1: 10,20
...
I would like to read the contents of the file into a NSString then do the parsing. How do I read the contents of a file into a string? Also, wher...
My plists simply start with "Root". Theirs contains arrays of useful stuff you can select to tweak the configuration.
The specific info.plist I am looking at is in an iphone project.
I have researched this a little bit, (not alot) but haven't even detected a smell of solution.
What mechanism is putting this together? Can I bend it to my...
It is to my understanding that one should use a forward-class declaration in the event ClassA needs to include a ClassB header, and ClassB needs to include a ClassA header to avoid any circular inclusions. I also understand that an #import it a simple ifndef so that an include only happens.
My inquiry is this. When does one use #import ...
My application has a series of table views based on some hierarchical data. For example, the user selects "Browse by XYZ" on my CategoryListController, and then I load my DocumentListController based on that selection.
Right now I'm getting the list through a web service that returns some JSON data, but that's beside the point. I could ...
Hey,
We have a JavaEE server and servlets providing data to mobile clients (first JavaME, now soon iPhone). The servlet writes out data using the following code:
DataOutputStream dos = new DataOutputStream(out);
dos.writeInt(someInt);
dos.writeUTF(someString);
... and so on
This data is returned to the client as bytes in the HTTP ...
Is it possible to make a big 50MB database native on the iPhone? So that it can be searched very quickly in a smart way? With SQlite?
...
I know each iPhone has a electronic identifier other than the phone # or ESN - how do I call it and what does it return?
...
I'm using a custom tintColor on my UINavigationController's navigation bar, and because the color is so light I need to use dark colored text. It's relatively easy to swap out the title view, and the custom buttons I've added on the right hand side, but I can't seem to get a custom view to stick on the back button. This is what I'm tryin...
When deploying the application to the device, the program will quit after a few cycles with the following error:
Program received signal: "EXC_BAD_ACCESS".
The program runs without any issue on the iPhone simulator, it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again, I wi...
It seems UITextFields convert all non-breaking spaces (nbsp, U+00A0) to spaces (U+0020). This causes problems for the editing of locale specific numbers. For instance, in the French/France locale, the non-breaking space separates 1 and % to form "1 %". However, since the UITextField converts the separator character to a space, the loc...
I'm in a hypothetical situation in which I need to list students in a school. I have one table view controller that has several sections, representing a school. Each school has subsequent students. Now, I have the requirement to give the user the capability to view all students for a particular school by clicking on the school name in a ...
I'd like to add a logo to the left of my title on my navigation bar. The title property seems to only take an NSString. What's the best way to add an image to the navigation bar?
...