iphone

best way to store data locally and update from web from time to time ?

Hi, I have created an app which displays information in a organized manner about cultural places. The information is subject to changes, so I want it to be downloaded from the web. But not everytime. Only once in a while, because information doesn't change often. What I want to do is, the first time the user opens the application, it ...

Making a UIView "disappear" behind another tabbar

I'm using the following code to make a small view disappear at the bottom of the screen: int y_dest = self.application.windows.frame.size.height; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.33f]; [UIView setAnimationDelegate:self]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@sele...

Preventing an app from exiting immediately?

Hello, How can I prevent an application from exiting immediately? If the user press the home button while the application is saving a picture to the photo album, only a part of the picture is saved! Thanks! ...

How to detect a SubView has closed?

I have View A, when the user clicks a button I pop up View B. When the user dismisses View B, and we return to View A I would like to refresh a label on View A, but is there an event that I can use to detect that we have returned to View B? I know that ViewDidLoad doesn't fire again. ...

Licensing iPhone software by "number of items supported"

Lets say that I have an application that helps people "manage" a certain number of "items". Normally they'd have to manage information about these items on paper, but my application will let them do it on the phone. I want to sell my application by the number of items it supports. For example, I might charge $10 for the version that has...

iPhone new game, help!!!

Hello I'm a programmer that has just recently started programming applications for the iPhone. I want to create a game where the main character goes around a series of room and each of this contains a different minigames. The game is going to be 2D similar to the likes of "Final Fantasy Advance Tactics", Pokemon or Zenonia(for the iPho...

Is this the best way to dynamically load a UIViewController object based on item selection?

My root view contains three sections in a table view. Depending on which section is selected a corresponding view controller will be popped onto the view stack. The following didSelectRowAtIndexPath method is from my code and it works as I expect, but I was wondering if this is the correct/most elegant way to do it. I'm an Objective-C ne...

How do I create a text field or label that resizes based on how much text is in it?

I've seen at least one application that uses a grouped UITableView with a cell containing paragraphs of text, and the cell is taller or shorter based on the length of the text, but I don't quite get how this is done. How does one, given a variable width font, figure out how high a UITextField or something needs to be in order to display...

Please help with an OpenGL ES (iPhone) multi-texturing (2D) code!

I have a texture from this PNG: And another from this PNG: They both have the same blend function: glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); I want to see them on one single polygon first. I just couldn't find a simple example of this. Draw them to different polygons works perfect, but I just cannot "merge" them into one text...

How to setup 2 iPhone SDKs on one Mac

Based on your past experience, will two iPhone SDKs co-exist on a single mac? For example, one that is in beta and one that is released. I am planning to just copy an existing SDK to a different folder before installing a new one - would appreciate any prior warnings! ...

Can I store a custom object inside a button in Objective-C?

Hi, In winforms/C# most all UI Controls have a .Tag tag, so like myButton.Tag = myObject; where the Tag property is an 'object' type so you can basically store any type of object. How might I accomplish this in Objective-C/Cocoa? do all UI elements have something like .Tag where I can store an NSObject or something? If so, can you pleas...

Using MFMailComposeViewController to send a mail, get “EXC_BAD_ACCESS” when dismissing the modal view controller.

Hi, I am sending an email from my iPhone app using MFMailComposeViewController. This works fine but after sending or canceling I need to dismiss the modalViewController. When I do this I get a Program received signal: “EXC_BAD_ACCESS”. This is not very descriptive... Please help!! This is the code for creating the mail and the modalVie...

iPhone SDK parsing XML not working correctly

I was wondering if anybody can help me with parsing XML from RSS feeds. I am following the tutorial in iPhone in Action by Allen and Appelcline. I've got the .xml file to be read by the parser and display its table elements but when I then select a table entry the controller takes me to a new tableview for that title OLK but it does not ...

Question about ivars and @property's on the iPhone

I have a question about how instance variables work and when to use the @property. Here is an example interface file I am working with @interface PackageModel : NSObject { NSString *tracking; NSString *carrier; NSString *status; NSMutableDictionary *events; // Connection ivars NSMutableData *receivedData; ...

pitchbend (varispeed) audio with iPhone SDK's AudioUnit

hi, I'm trying to manipulate the speed (and pitch) of a sound while playing. so i played around with iphone sdk's AudioUnit. downloaded iPhoneMultichannelMixerTest and tried to add an AUComponent to the graph (in this case a formatconverter). but i get (pretty soon) following error when building: #import <AudioToolbox/AudioToolbox.h> ...

FBConnect iPhone Questions

hi . i am using FBConnect for sharing something on my app . so i want implement FBConnect API with 2 buttons "Login / share on facebook" Via UIACtionSheet . now , have some questions : assuming i have 2 buttons on the UIActionSheet with title of "Share on Facebook" "Login" i want when user have logged in facebook my Login button ti...

How to Load a View in viewDidLoad?

I want to load a second View at the beginning of a program. I thought, that the viewDidLoad-methode would be the right method. The problem is that it doesn't work. The reason why I want to load a view in the viewDidLoad-method is that it is possible on a new device (iPad) to load a view over the other view. How can I make it? I tried ...

Is there a method to programatically add a website shortcut to the iphone?

I am looking to add a button to my website which easily allows people to turn the site into a shortcut on their phone. I'm looking to automate the actions shown here: http://www.simpleleapsoftware.com/blog/how-to-create-shortcuts-iphone-ipod-touch-115 for my users, specifically for my website. I'm open to any alternative ideas of makin...

NSDateFormatter dateFromString and iPhone in 24 Hour Format Confusion

I'm having a problem. I get incoming time strings in 12-hour format, and I'm turning them into NSDate objects. When the iPhone is in 12 hour format, no problem. But when it's in 24 Hour format, things go wrong. Here's some sample code to demonstrate: NSString *theTime = @"3:19 PM"; NSDateFormatter *formatter = [[NSDateFormatter alloc] i...

Access an AFP share from iPhone?

Hi, I wonder whether it's possible to connect to an AFP (Apple Filing Protocol) share from my iPhone. I have a share in my WiFi network and would like to browse and read files on that share from my iPhone. Is there a way to do that with the official SDK? If not, are there any libraries out there that I could use? Thanks. ...