iphone

Store large lists of data in iPhone app so they are available to the UI

Hi A bit cryptic, which is also what drives me to start a thread in here, I simply can't find the words to Google the challenge. Im building an app that will have 2 search views that displays 1400 and 16000 possible choices. It is plain lists, no relational or otherwise spanning data. As far as I can figure out I have 3 possibilities:...

How to extract the second record from my plist?

I have a sample database file called albums.plist It is structured as below (very simple layout). I am new to Objective-C programming and would learn a lot if someone is able to help me figure this out. What I would like to do programatically is parse this database and for example, show on screen for example, the second albums details ...

Problem with memory leak on iPhone...

I have a strange problem with a memory leak (the only one ;-) ) in my iPhone app: I don't know where I have to look for the cause of this leak... the strange thing is that this, exactly this leak also shows up if I create a new navigation-based app and just run it without any changes. I'm testing it in the simulator BTW because I don'...

Flickr Iphone app Background image zoom and fading animation

Hello all would anyone know how flickr manage to make this type of effect on their app where on the main screen you see a background image moving to the side and zooming in and fading to another image its really cool. your link sources for code or tutorials are always appreciated thanks PS im trying to implement this to one of my apps...

Is an iPhone SDK patch available, or do I need to download the entire tool set?

I've looked around Apple's site, and searched Google, but I can't find anything. I was wanting to patch the iPhone SDK to version 3.1.2 so I can deploy to my device again. I see the download for the iPhone SDK/Xcode bundle, but I was wondering if there was a patch that wasn't 2.7gb. Thanks ...

how do we keep the keyboard rather than dismissing it using UITextField textFieldShouldReturn?

I want to keep my keyboard up after I input something since I am gathering up multiple answers for one question. So far I am calling: - (BOOL)textFieldShouldReturn:(UITextField*)textField { [textField resignFirstResponder]; return YES; } But when remove resignFirstResponder, I am not getting any response for my input handler on t...

iPhone SDK: Navigation is causing crash.

My app is crashing when I navigate two view controllers in my application. For example, if I do this sequence: RootController ViewControllerA ViewControllerB ViewControllerA My app crashes. It crashes when I pressed the back button in ViewControllerB. So, It seems like it is with two or more ViewControllers being pushed. Each by them...

How do I install a development iPhone app on my phone for testing?

I have an iPhone application built as an .ipa file. I also have my device registered on my Apple Developer Connection account. I downloaded the .mobileprovision and dragged both it and the .ipa into iTunes. The app shows up fine in iTunes. When I try to sync, though, I get The application "FUBAR" was not installed on the iPhone "My P...

Limit the returned resultset in CoreData

In CoreData, if I want to limit the returned resultset to 100, is it enough to just set the fetch limit to 100, or do I need to set the fetch batch size to 100 as well? ...

Iphone sequential animation with setAnimationDelay

I'm trying to chain animation events. The application I'm coding for work has a multiple choice quiz. First you pick your multiple choice answer. The quiz view fades away. Then a label ("correct" or "incorrect") fades in and then fades out. Finally the quiz fades back in again. The events are called and handled by a main viewController. ...

why does the uitextfield never return nil when it becomes first responder?

when i make my textfield become first responder, the text field never returns nil, even if i force it to be nil by myTextField.text = nil; as soon as i comment out the "[myTextField becomeFirstResponder];" the text field is able to return nil. anybody have any idea why? ...

On the iphone, how do I add a location to the maps application?

Is there a way to add a location from an MKMapView in my application to the built-in Google Maps app? From what I understand there is probably one of two ways to do it: using [[UIApplication sharedApplication] openURL:xxx] (like opening a web address, writing an email, or dialling a number) or using a C-api like adding a contact to the ...

iPhone SDK: Navigation among view controllers causes crash

(Sorry, I restarted this thread as I incorrectly accepted the answer for my problem.) My app is crashing when I navigate two view controllers in my application. For example, if I do this sequence: RootController ViewControllerA ViewControllerB ViewControllerA My app crashes. It crashes when I pressed the back button in ViewController...

iPhone SDK: Two animation sequences playing at random *help*

I have two animation sequences, and I want one of them to play randomly when a button is pressed. Here is the code: { color.animationImages = [NSArray arrayWithObjects: [UIImage imageName: @"1.gif"], [UIImage imageName: @"2.gif"], [UIImage imageName: @"3.gif"],...

Can I do openGL geometry batching without transforming all the vertices by hand?

I've been trying to set up some sort of geometry batching for a week or so, there isn't a ton of information online as to how other people have implemented this. Basically I just want to 'catch' every draw call, sort the corresponding meshes by texture, and then draw all meshes that share a texture in one go. What I've been doing is go...

Objective-C returning alloc'd memory in a function == bad?

This is on the iPhone. So what if I have a function like - (SomeObject*)buildObject; Do I need to pass in a variable that I have already alloc'd outside like - (void)assignObject(SomeObject** out); Or can I do - (SomeObject*)buildObject { return [[[SomeObject alloc] init] autorelease]; } and use it like SomeObject* obj = [[...

iPhone UIAlertView Problem

Ok so I have this code NSMutableArray *smartThings = [[NSMutableArray alloc] initWithCapacity:3]; NSMutableString *smartString = [NSString alloc]; int random; int numOfThings = 1; random = arc4random() % numOfThings; smartString = [smartThings objectAtIndex:random]; UIAlertView *smartAlert = [[UIAlertView alloc] initWithTitle:@"Thing To...

Generate hash from UIImage

I'm trying to compare two UIImages from the file system to see if they are the same. Obviously, I can't use NSObject's hash method, since this returns a hash of the object, and not the actual image data. I found code generate an MD5 hash from a string, but I haven't discovered how to implement it for a UIImage. How should I go about ha...

Getting Current Time in string in Custom format in objective c

I want current time in following format in a string. dd-mm-yyyy HH:MM How? Thanks in advance. Sagar ...

Am I permitted to change the object graph in NSManagedObjectContextObjectsDidChangeNotification?

I'd like to know when an object has been inserted into my Core Data MOC and when it has, add it to another object with a relationship. So I watch the NSManagedObjectContextObjectsDidChangeNotification notifications find all the objects of the correct class in the set of inserted objects and make the connection using addObject so that t...