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 am using cocos2d-iphone to place Sprites onto a Layer to setup a game playfield. At certain points in the game, certain Sprites need to be removed based upon game conditions. What I would like to do is setup an array of Sprite pointers, but I have two questions:
What's the best way to place Sprite pointers in an array?
How does o...
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...
I am looking for an example that renders an interactive earth similar to the one in the Smule products.
Any help will be great even if it is just part of the solution.
...
I noticed methods marked optional in several protocols defined in the iPhone SDK, such as the UIActionSheetDelegate protocol for example.
How can I define a protocol of my own, and set a few of the methods as optional?
...
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?
...
what's the best way to throw an exception in objective-c/cocoa?
...
When implementing an +initialize or +load method in one of your Objective-C classes, should you always start with this kind of guard?:
@implementation MyClass
+ (void)initialize {
if (self == [MyClass class]) {
...
}
}
...
@end
Seems like code in +load and +initialize usually only wants to be executed once. So this w...
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...
I want to control/override the auto-complete feature when a user enters text in my iPhone app.
Specifically I'd like to auto-complete a collection of words I supply. For example say my name is BillBobJohn. When I type "billb" auto-complete will suggest BillBobJohn.
How can I do this?
...
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...
Now I have a stack of free time on my hands, I wanna get into iphone dev fo real.
But Objective C scares me (a bit). It feels I'm going a bit back in time. I say this because I've spent the last 8 months coding in C++.
JSCocoa looks awesome, but does this actually work on the iphone?
What would need to be done to get this working on t...
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 ...