iphone

How to Get the Direct Access Index for NSDictionary of NSDictionary

Here's the code: NSMutableDictionary *circuit_step = [NSMutableDictionary dictionary]; NSMutableDictionary *step_info = [NSMutableDictionary dictionary]; [step_info setObject: @"search" forKey: @"search-type"]; [step_info setObject: @"small" forKey: @"search-format"]; [step_info setObject: @"winter" forKey: @"...

Does Core Data cache transient attributes?

I have the following scenario: entity with a transient attribute used for sectioning web-based data model periodically refreshed NSFetchedResultsController Everything works fine, but when I do a refresh, that transient attribute seems to be getting out of date. The attribute is returned by an accesssor in my entity object. I tried s...

How to control the searchResultsTableView of a UISearchDisplayController?

Hey! I wonder how to take control over the table view that is used by the UISearchDisplayController. You can't overwrite the searchResultsTableView property of the UISearchDisplayController, because it is a read-only property. I've tried to overlay the searchResultsTableView by a custom UITableView. That works just once, but as soon as ...

Change background color of TTTabItem when using Three20 library

I'm using TTTabStrip in my iPhone app, the screenshot is below http://i377.photobucket.com/albums/oo217/zhustar/tttabbar.png?t=1265213089 I want to change the background color of the TTTabItem selected from blue to green and change the color of font from white to black. How can I do that ? ...

Best way to save user's login info on iPhone

Hey Guys, What is the best way to save user's login info on the iPhone? Is encrypting and saving in a file a good choice? Thanks ...

Do iPhone app settings have to be shown in the iPhone system settings?

If I'm using NSUserDefaults to store settings for my application, is there any way to make my app's settings "hidden" from being shown in the general Settings application on the iPhone? I know there are other tools out there such as mySettings, Keychain, etc, but I'm just wondering if there is a flag somewhere that says 'do not show my s...

Method for when the modal view has been dismissed

Hi. I have created an application with a modal view that I can display and then dismiss. Is there an easy way to know when the modal view has been dismissed? I would like to reload the data in a table once the modal view has been dismissed and don't know the best way of doing this. Thanks ...

iPhone - Failed to save the videos metadata to the filesystem.

My application uses the UIImagePicker to allow the user to use the camera and capture a photo to edit/etc. I am getting the error message below: 2010-02-03 10:41:24.018 LivingRoom[5333:5303] Failed to save the videos metadata to the filesystem. Maybe the information did not conform to a plist. Program received signal: “EXC_BAD_ACCESS”...

iPhone wait until code is executed

Hi, I am creating a method that is run once a user presses a button. The method creates a folder given the name defined by the user and adds a plist to that folder. The problem is that it doesn't create the plist. I know that the code works seperately, but I think that the plist creation is being done before the directory has been create...

How to use NSFetchedResultsController and UISearchDisplayController

Hey! I've been creating an iPhone App using Core Data. First of all, does it make sense to use an NSFetchedResultsController and a UISearchDisplayController together to fetch the result? Would you recommend something else? I've been trying quite long combining an NSFetchedResultController and a UISearchDisplayController. I've been thi...

Using a C function in Objective-C (for iPhone)

'lo all. I am a self-described admitted noob in iPhone programming (having a much longer perl & web background -- 30 years)...but took the plunge last week and bought a couple of good books. After cramming and reading well over 1000 pages -- and understanding it pretty well, I am well on my way to a good first Native iPhone app. My pro...

How to open call out MKAnnotationView programmatically? (iPhone, MapKit)

I want to open up the callout for an MKPinAnnotationView programmatically. Eg I drop 10 pins on the map, and want to open up the one closest to me. How would I go about doing this? Apple has specified the 'selected' parameter for MKAnnotationView's, but discourages setting it directly (this doesn't work, tried it). For the rest MKAnnot...

Use mapkit to calculate distance between two addresses ?

Hi Is it possible to use the mapkit in the iphone sdk to calculate distance between two addresses ? Thanks for the help. ...

I am not able to give an MKAnnotation an image!!!

Hey guys! I am having some trouble with giving an MKAnnotationView an image instead of a pin view. In other words, I am having trouble displaying a target image (target.png) instead of the normal pin view. Here is my code--- // .h file #import //Here it says to import mapkit NSString *mTitle; NSString *mSubTitle; } @end ...

How should I deal with the need for multiple callbacks for the same delegate in Objective-C?

I have created a library which can download JSON data which is then placed into an NSDictionary. I wrap this class with a simple Twitter engine which allows me to pull my friends timeline, post an update and post an update with my GPS location. From my limited experience with Objective-C the way to connect everything is with delegation. ...

Reusable NSMutableDictionary

Someone in that forum proposed me a code solution that worked great, but for my understanding, I would like to know what is the difference between the 2 blocks of code: Block 1 NSMutableDictionary* step_info = [NSMutableDictionary dictionary]; Block 2 NSMutableDictionary* step_info = nil; step_info = [NSMutableDictionary dictionary]...

Running Xcode iPhone unit tests with Cruise Control

When using Cruise Control to build an iPhone XCode project with Unit Tests, an error of "Code Sign error: a valid provisioning profile matching the application's Identifier 'com.yourcompany.Calculator' could not be found" is generated. This isn't encountered when run through XCode? Is Cruise Control trying to launch the app rather than j...

Saving application data state on exit

I have an NSMutableArray with 24 strings. I need to save this data if a user gets a call or quits the application. I have been looking into many examples but for some reason can’t seem to determine the best way to save the data. The 24 strings correspond to 24 buttons and their state. When a button is clicked, it displays the corr...

Simple menu in iPhone game

I am developing a puzzle game for the iPhone using core graphics implementing drawrect in a single UIView. I would like to add a menu which is opened from a UIButton event handler. I am not sure if I should do this via code e.g. have a menuopen flag and adjust the drawing routines and tap event handlers (manual implementation) or to go...

Animating multiple UIVIew cause problems

Hello there, In my current iPhone game project I am using UIView that are some game play elements (they are tiles). Animating one by one is working well, or in a small series (5 UIView animating at the same time). But once I decided to animate those same UIView more massively together I am starting to get some weird rendering issue (t...