iphone

iPhone programming - problem with CoreFoundation forking

Hello all, I've been working on an iPhone for several months. It's a 2d shooting game akin to the old Smash TV type games. I'm doing everything alone and it has come out well so far, but now I am getting unpredictable crashes which seem to be related to CoreFoundation forking and not exec()ing, as the message __THE_PROCESS_HAS_FORKE...

How to demo an iPhone app on a projector

Hi, What is the best way to demo an iPhone app on a projector? Preferably without jailbreaking and without using a separate camera to record the iPhone screen which might limit movement? Thanks, Tee ...

iPhone OpenGL ES - How to Pick

I'm working on an OpenGL ES1 app which displays a 2D grid and allows user to navigate and scale/rotate it. I need to know the exact translation of View Touch coordinates into my opengl world and grid cell. Are there any helpers to do the reverse of last few transforms which I do for navigation ? or I should calculate and do the matrix st...

How to detect the active iTunes store on the iPhone/iPod Touch/iPad?

I'd like to be able to determine which store the user connects to from inside my app, so that I can direct them to some appropriate content for their device AND store. Does anyone know how to get this information? Basically, if the user is in the UK, and connects to the UK store, I want my function/method to return GB, if in Korea, I w...

Core Data Model Design Question - Changing "Live" Objects also Changes Saved Objects

I'm working on my first Core Data project (on iPhone) and am really liking it. Core Data is cool stuff. I am, however, running into a design difficulty that I'm not sure how to solve, although I imagine it's a fairly common situation. It concerns the data model. For the sake of clarity, I'll use an imaginary football game app as an e...

Appcelerator Titanium - auto height table views break with shortish text

I posted this on the Appcelerator Titanium dev Q&A site, but maybe someone here has had this issue... KitchenSink 1.1 illustrates this issue. In table_view_api_auto_height.js, changing row: addRow(0,'This is some long text. This is some long text. This is some long text. This is some long text. This is some long text. This is some...

iPhone autorotation for too many objects on screen

Hi! I have a BlahAppDelegate, BlahViewController and no nibs in my iPhone app project. Only some subclasses of UIView in addition. All this is situated in main.m. My app has 6 subclassed UIViews. Each of it contains 18 UIImageViews. I need to get autorotating work. Or custom rotating. Or something. For example it would be nice to fade t...

When is a device token assigned?

I am trying the Urban Airship APNS development push server. When I run their sample app, I can't seem to get the Device Token. What needs to be done to make sure the token exists? I've checked the provisioning profile and the bundle id. Does my server need to push (through UrbanAirship) for the token to be generated for the first time? ...

iPhone: Utility Application - Open Flipside on startup

I have an application that I started with the Utility Application template. I'm using the Flipside for the Settings screen. I'm having the settings serialized to a file when the app is closed and deserialized when the app is opened. If there is no file to deserialize at startup, I want the flipside to be shown so the user can enter requi...

Reflow PDFs for an iPhone screen (iPhone SDK)

I'm currently making an iPhone app that has PDF viewing a crucial part of its functionality. However many of the PDFs aren't iPhone friendly and require zooming and panning to read them. Is there anything I can do to make them better whether with the PDF itself or programmatically? (I'm currently using a UIWebView PDF viewer by the way....

iPhone SDK: How do I programatically change the background image of a UIButton added to a NIB?

I've seen several questions/answers related to entirely creating a button in code, but not one which would let me know how to change the button image in code, when I originally added the button to my NIB in Interface Builder. I know how to change the background in Interface Builder.. but I want to change it in code, so I can change it a...

How to tell when back button is pressed in a UINavigationControllerStack

Is it possible to check when the back button is pressed in a UINavigationController stack? I've tried adding a action and target to self.navigationItem.backBarButtonItem to no avail. Anyone have any solutions? ...

Getting started with Festival (on iphone)

I'd like to use Festival in an iPhone app. Is this possible, considering the way Festival generates and then plays back audio files? Can I pass Festival an audio file directly from itself to play back? or is there a different way to read things? Is there another Text-to-speech engine for C/C++ to use with iphone? EDIT: Free is better....

Changing X & Y of Button upon Rotation

Edited Mar 30 - Note: Monotouch used. When I rotate to LandscapeRight/Left I want to change the location of some of my buttons. Here's what I'm trying: Have my ShouldAutorotateToInterfaceOrientation returning True. In my WillRotate (I tried putting this in DidRotate as well) it doesn't show any difference, here's my code: public ...

App freezing after lunch without any Error on Iphone Simulator?

HI.I am using CoreData on my UITable to show some records.It works when I first run.But if I run my app on simulator second time it shows up with data but then it stops.Sometimes it quits from app or it only froze and i cant click on table or tab bar. I looked also on Console but I thought there is no error.Here output from console The...

Advance way of using UIView convertRect method to detect CGRectIntersectsRect multiple times

I recently asked a question regarding collision detection within subviews, with a perfect answer. I've come to the last point in implementing the collision on my application but I've come across a new issue. Using convertRect was fine getting the CGRect from the subView. I needed it to be a little more complex as it wasn't exactly rec...

How do I use the gravity vector to correctly transform scene for augmented reality?

I'm trying figure out how to get an OpenGL specified object to be displayed correctly according to the device orientation (ie. according to the gravity vector from the accelerometer, and heading from compass). The GLGravity sample project has an example which is almost like this (despite ignoring heading), but it has some glitches. For ...

Setting a UITableViewCell accessory type on some cells, but not all

I have 8 cells that are being built in my UITableViewController. I would like to know how I can show a disclosure indicator on the 4th and 8th cells. Right now I am building it in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath though I am fully aware it is going to add a disclos...

iPhone -- init method of an abstract class

I want to create classes Car, Vehicle, and Airplane with the following properties: Car and Airplane are both subclasses of Vehicle. Car and Airplane both have an initWithString method. The acceptable input strings for Car's and Airplane's initWithString methods do not overlap. Vehicle is "almost abstract", in the sense that any initial...

Disable animations when ending search in iPhone

Hi. A quicky: is there a way to dismiss the keyboard and the searchDisplayController without animation? I was able to do it when the user presses "Cancel", but when the user presses the black "window thingy" above search field (only visible while the user hasn't inserted any text), the animation always occurs, even when I change the de...