iphone

iPhone SDK: subFolders inside the main bundle

Hi, in the current project I have a number of folders, with subfolders, and these contain images: 01.png, 02.png. Folder1/FolderA/f1.png Folder1/FolderB/F1.png When I compile the app, I looked inside the the .app and noticed that all the images are placed in the top level, with no sub-folders. So clearly when trying to load the imag...

Set textbox focus in mobile safari

Hey, I was wondering how to set the focus to a text box in Mobile Safari. I've tried document.myForm.myTextArea.focus() which works in regular Safari, but it does not seem to work in Mobile Safari. To clarify, I want to set focus to a text box as soon as the user loads a page, and have the iPhone keyboard pop up. ...

iPhone POST to PHP failing

I have this code here: NSString *post = [NSString stringWithFormat:@"deviceIdentifier=%@&deviceToken=%@",deviceIdentifier,deviceToken]; NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:NO]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSMutableURLRequest *request = [...

Access custom cell within - (void)tableView:commitEditingStyle:forRowAtIndexPath:

Hey Guys, does anybody know how i can access a custom cell within the - (void)tableView:commitEditingStyle:forRowAtIndexPath:. I need access to my Custom Cell Class to retrieve some parameters. Thanks. ...

How do I allow users to dial numbers in my tableView cells?

Hi all, I have a table containing cells with phone numbers. How can I allow the user to dial these numbers by tapping the cell? It's not working by default and there's no option in interface builder like there is for uiwebviews so I imagine I need to programmatically tell the app to dial the number when the cell is tapped. ...

Core Data managed object context thread synchronisation

I'm have an issue where i'm updating a many-to-many relationship in a background thread, which works fine in that threa, but when I send the object back to the main thread the changes do not show. If I close the app and reopen the data is saved fine and the changes show on the main thread. Also using [context lock] instead of a different...

Core Data Relationship List

I'm not sure whether or not this is the appropriate way of doing this, but I was wondering what's the best way to approach a relationship to a value in a list with Core Data? For example, say you have a 'person' entity. Each person can have a different 'hair color'. I'm trying to basically define the hair colors in my data model and allo...

Call method with parameters after animation completion

I want to call a method with certain parameters once an animation is done. The flow is something like this: -(void) myMethod:(int)val { [self performAnimation]; [self doSomethingElse:val]; // This should be done after animation completion } I presume the 'doSomethingElse' method needs to be called from the method defined in '...

Simplest means to fade/dissolve between two UIImageViews

Could someone give me a little direction on creating crossfades/dissolves between two UIImageViews in the same view controller? I am trying to set up an effect of a background image slideshow but not sure on the mechanics. Thanks. ...

willAnimateRotationToInterfaceOrientation not firing iphone UIInterfaceOrientation

Hello, I have a view inside a tabbarcontroller and navigationcontroller and my willAnimateRotationToInterfaceOrientation method is not firing. I have set the view to be FirstResponder and also shouldAutorotateToInterfaceOrientation returning YES; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrienta...

How to save video from a url to disk, also how to begin playback after some buffering?

First question is, given a url to an mp4 video, how can I save that file to disk? The followup to that is while its saving, can I begin playback after its buffered some of the video to disk or do I have to wait for the entire file to be written and then: MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContent...

Why are my "tel:" links not working

I have a tableView which has cells with phone numbers. The app is not dialing the numbers though. See the code below - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 2) { UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:indexPath]; NSString *num...

Xcode newb -- #include can't find my file

I'm trying to get a third party audio library (STK) working inside Xcode. Along with the standard .h files, many of the implementation files include a file called SKINI.msg. SKINI.msg is in the same directory as all of the header files. The header files are getting included fine, but the compiler complains that it can't find SKINI.msg. W...

iPhone architect choice for large text flow w/links

I am designing an app which will present large amounts of text that is interspersed with notes and references as clickable images. On a PC I'd use a control that shows HTML, but in the iPhone I am not able to intercept the touches of images and links too well using the UIWeb control. Should I use a UIScroll and build the text as lables ...

iPhone - is there a way to detect where a picture was selected from?

When Using UIPickerController I have two choices on my App: take a picture take a picture from the library (photo album) but the library itself is composed by two parts: camera roll other photo albums Is there a way to detect if the picture was selected from the camera roll or from the other photo albums? thanks for any help. ...

"-[CFNumber intValue]: message sent to deallocated instance" and no idea

Hey there, i have a problem with a exc bad access. I already turned in NSZombieEnabled, but cannot figure out why this problem will be caused. How the cartInstance Array is defined you can see below in the following function. It's a NSMutableArray with several NSMutableDictionaries The error occurs every time my counter i reaches 13. The...

iPhone OpenGL tutorial

Hi, I am planning to make a 2D game on iphone. Is there any tutorial for getting started with opengl 2D example for iphone specially how to animate a sprites and draw tile map. Any other beginners tutorial is also welcome. Thank you in advance ...

UITableView custom popping

Okay, I made an app that has a list of items as a main view, and when you select an item it pushes a detail view controller. In this detail view controller you can switch between items. I want to be able to push a view, scroll a few items, and pop the view as if the current item was initially selected. I want to push a view, and then whe...

Prevent status bar from receiving touch events

Edit After further testing, it appears that the part of my button that are not clickable are where the status bar used to be. I'm hiding the status bar with : // -- Override point for customization after app launch [[UIApplication sharedApplication] setStatusBarHidden:YES]; Also added the Boolean value to my *-info.plist file: U...

info/information icon for apple iphone

That little "i" with a circle around it on the iPhone, like on the bottom right hand side of the screen in the Weather application, is there a way we can use that icon in the SDK? Thanks. ...