I have a tableview with several sections. I would like to be able to move rows from one section into another and to delete a section once it has no rows. I am trying to do this through moveRowAtIndexPath but the code I have doesn't work and throws an NSRangeException exception.
Here is a code sample:
- (void)tableView:(UITableView *)ta...
My user enter a text in a UITextField then press a UIBarButtonItem to confirm.
If there's a autocorrection suggestion when the user tap the UIBarButtonItem, it is not accepted. How do I accept it programmatically?
...
I'm having trouble declaring a C Array as an Objective-C Property (You know @property, and @synthesize so I can use dot syntax)...Its just a 3 dimensional int array..
...
I'm following a book on iPhone development and there is a particular pattern I keep seeing in the example code that doesn't make much sense to me. Whenever a property is set they first assign a pointer to the new value for the property, then set the property to the pointer, then release the pointer. Example:
Interface:
@interface Doubl...
hi, im working on an application that requires me to use a Long Double variable, which, in C/C++/ObjC, should be precise up to 15 floating values (1.123456789012345), the only issue is that on the iphone, i can only seem to display up to 6 places (1.123456) using
NSString *display = [NSString stringWithFormat:@"%Lf",value];
I was read...
What's the preferred approach for constantly sharing data across threads when using Core Data? I am downloading a large file and want to show progress of the download in a UIProgressBar. The actual download is happening in a background thread created by NSOperation.
The download information (local path, total bytes, bytes received) is ...
I'm doing this to learn how to work with Core Animation animatable properties on iPhone (not to learn how to crossfade images, per se).
Reading similar questions on SO leads me to believe it can be done by animating the .contents property of the UIImageView's layer like so:
UIImage *image1 = [UIImage imageNamed:@"someImage1.png"];
UIIm...
Hello, i`m a begginer xcode/iPhone developer and i want to do a text bubbles like a Adventure games.
When i clik a bubbles show 2 or 3 lines of text and when a i click another time shows 3 lines more...
...
HI all
I am using some files on .mm extension in the xcode project for compiling these files we have added the LLVM-GCC 4.2 in the build setting after adding this compiler this showing the error
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such f...
I have a verb conjugation app that displays verb translations in the first cell of a table. At present the translation list is just a string (comma-separated list) but I'd like to change it to have clickable buttons. I had a play around adding buttons to the cell view without too much success but my only experience with custom cells has ...
I'm using Matt Gallagher's AudioStreamer to play MP3s over HTTP. I need to know the duration of the song and the ID3 tags.
Is it possible to implement this in the AudioStreamer, and how?
...
I have a UITextView that I shrink upon bringing up the keyboard. An issue I just ran into though is as I type past the keyboard, rather than the text start scrolling, the UITextView automatically gets bigger. How can I possibly turn this off?
EDIT
This is not a subclass, this is a plain old UITextView. It's definitely resized and gets ...
Hello,
My NSMutableArray instance contains instances of different types of objects that have common ancestor. I want to serialize the array, but NSKeyedArchiver class seems to archive arrays contain certain types of objects. Is there an easy way to to this with stock serialization classes ?
...
The readme included with the new Xcode 3.2.1 this week says the following:
Static code analysis is fully integrated within the Xcode IDE via the Build and Analyze option under the Build menu or via custom build settings
GCC 4.2 is the default system compiler for the 10.6 SDK
The optional LLVM compiler is included using two different fr...
One of the iPhone code samples from Apple is the BubbleLevel app. On trying to build the project, the line below throws an exception which reads "error: 'UIButtonTypeInfoLight' undeclared (first use in this function)". Changing UIButtonTypeInfoLight to some other valid value will allow the project to build, but I can't tell if the simu...
I have a cocoa-touch app, using the core data framework.
I've created a xcdatamodel with two entities: Program and ProgramReplay.
ProgramReplay has a relationship to Program, and a reverse relationship exists in the later.
I've saved this, and used XCode's feature to generate the classes for these two entities. The generated headers ar...
I have seen plenty of articles and SO questions about streaming TO an iPhone app, but my question is the reverse, that is, streaming FROM an iPhone app.
I have audio content in an iPhone app, that I want to stream to a browser. So the idea is that the browser can connect to a server running on the iphone. The server on the iphone will...
It looks like the recent Xcode 3.2 has added some code generation niceties that (I think) were lacking pre-Snow Leopard.
I took the following steps:
Define a simple .xcdatamodel model with a few entities, including one (inversible) one:many relationship (an Endpoint has many Subscription objects)
File -> New and select the (icon-less)...
Hi:
I need to rotate the content of the mapView according to the compass value:
float myHeadingValue = newHeading.trueHeading;
and for rotating the map I use this:
[mapView setTransform:CGAffineTransformMakeRotation( [self degreesToRadians:myHeadingValue] )];
but it rotates the view, not the content of the view.
How can I make it...
I have several .png images (ETA: but the format could also be JPEG or something else) that I am going to display in UITableViewCells. Right now, in order to get the row heights, I load in the images, get their size properties, and use that to figure out how high to make the rows (calculating any necessary changes along the way, since mo...