I have a complex settings style table where individual cells represent different aspects of a data model class. Users can click into a cell and edit individual attributes, such as say if I have a user class, a name, date of birth, etc. My question is, do I need to have an instance of UITextField for each unique cell? Can I just create on...
I have a table which has roughly 10 cells, 4 different types. I subclassed UITextViewCell because I wanted to have an IBOutlet to a label and to a UITextField. Not sure if that was the best way of handling it, but it works thus far. Next, I had a cell for gender, so I figured instead of subclassing UITableViewCell, I took my already subc...
If I have an NSString with a text file in it, how do I get an NSArray of NSString with each NSString containing a line of the file.
In 10.5 I did this:
NSArray* lines = [str componentsSeparatedByCharactersInSet: [NSCharacterSet newlineCharacterSet]];
But that doesn't work in 10.4, and my program needs to work in 10.4.
As well, it ne...
I am writing an Objective-C application which communicates with a USB device. The application writes certain data to the device continuously and displays the status of the write operation in a textView, which is an object of NSTextView. I call the -[NSTextView insertText:] method in the loop when I get the write operation status from the...
I'd like one of my table rows to be a button that takes up an entire row of my UITableView. I figured the best way to go about this is to instantiate a UIButton, and give it the same frame size as an instance of UITableViewCell, and add that as a subview to the cell. I'm almost there, but quite a few pixels off to not get that perfect to...
Is it possible to modify a UIActionSheet with a custom UIView? I have a preferences cell in one of my tables which would benefit greatly from a modal window appearing with a UIDatePicker. Having it appear as an Alert would be fantastic as well. Ideally it would be nice to get the free animation that comes in play with UIActionSheet. Othe...
I'm using an NSTimer to do some rendering in an OpenGL based iPhone app. I have a modal dialog box that pops up and requests user input. While the user is providing input I'd like to "pause" i.e. something like this:
[myNSTimer pause];
I'm using this syntax because I've been doing things like:
[myNSTimer invalidate];
when I want ...
I need to generate a tone that I can manipulate frequency and wave. The overall goal is to create a basic piano. Does anyone know how I can achieve this?
My development platform is the iPhone 2.x
...
I have a technical question.
This is NOT a question about proper coding.
My question is TECHNICALLY is releasing objects on a programs exit/close needed?
In other words, lets say for the sake of argument, you have a button that closes your application, but right before you close you display a image, and then you close the application.
...
I'm trying to get a UIDatePicker with a UIButton to show up in a UIActionSheet. Unfortunately it gets cropped off and the entire Date Picker is not visible. I have not even attempted to add the UIButton yet. Can anyone suggest on getting the entire view to fit properly? I'm not sure how to add the proper dimensions as UIActionSheet seems...
According to Cocoa Programming for Mac OS X, 3rd Edition, on page 245 (chapter 17), you will usually create views in Interface Builder. However, it is possible to create them in code, a la:
NSView *superview = [window contentView];
NSRect frame = NSMakeRect(10, 10, 200, 100);
NSButton *button = [[NSButton alloc] initWithFrame:frame]; ...
Developing for the iPhone has been my first experience with objective-c and first in-depth experience with xcode. How difficult would it be to port an openGLES iPhone app to the OSX desktop using openGL? I am not asking about user interface - obviously there is no equivalent to cocoa touch UI on the desktop. I am asking specifically ab...
I have a navigation view with a cell that has something as simple as a Date of Birth. When that particular row is clicked, a new controller get pushed into view with a UIDatePicker. Once a new date is selected, I'd imagine I need to do something in viewWillDisappear: for that particular cell's UITextField value. What's the best way for m...
Couldn't think of an intuitive way to paraphrase the topic for this question, and I apologize for that. My question is the following:
I have several UIViewController's which need to call in a UIDatePicker. I didn't want to subclass the Date Picker several times as it's the same interface. The problem I'm having is figuring out what tool...
Is it possible to save an integer array using NSUserDefaults on the iPhone? I have an array declared in my .h file as: int playfield[9][11] that gets filled with integers from a file and determines the layout of a game playfield. I want to be able to have several save slots where users can save their games. If I do:
NSUserDefaults *p...
I have an issue where when a textField is clicked on in a UITableView cell, the method tableView:didSelectRowAtIndexPath: does not get invoked. The problem is, I need to scroll my tableView into proper position, otherwise the keyboard goes right over the first responder.
I have to then move code like this:
[[self tableView] scrollToRow...
I have a web service which returns tab delimited data (see sample below).
I need to parse this into an array or similar so I can create a navigation view of it.
I've managed to perform the web request and could parse an XML file, but my knowledge of Objective-C is small.
433 Eat
502 Not Fussed
442 British
443 Chinese
4...
How do I implement this method (see below)? I'm new to Objective-C and I'm just not getting it right.
From: http://lists.apple.com/archives/Webkitsdk-dev/2008/Apr/msg00027.html
By default databases have a quota of 0; this quota must be increased before any database will be stored on disk.
WebKit clients should implement the Web...
I am looking to setup a transition between two levels(after one level is complete, use one of cocos2d's slick transition to transition into the next level). In my GameLayer implementation, I have methods setup to do things like [self buildLevel: 3] to build the playfield. What do I need to do to instantiate a new GameLayer or Layer nod...
Can anyone guide me in the correct way to build a colored bubble/circle programmatically?
I can't use images as I need it to be able to be any color depending on user interaction.
My thought was maybe to make a white circle image and then overlay a color on top of it.
However I am not sure if this would work, or how to really go about ...