ios4

How do you make an iOS 4.0 app compatible with iPhone OS 3.1.3?

So, I may have made a mistake in updating my application to iOS 4.0 by wiping my Xcode installation and only installing the 4.0 SDK (I can't even find SDK 3.1.3 in my backups, doh!). I have an app now that has been built with a base SDK of 4.0 and it says in iTunes it requires 4.0 but the only thing I added was the methods -applicationDi...

iPad orientation change - How to animate load of new nib/xib

In a UIViewController am detecting the view's change in orientation using didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation. I then load a nib that corresponds to the correct device orientation using [[NSBundle mainBundle] loadNibNamed: owner: options:]. Works ok, but is a little clunky looking. Is the...

iOS custom URL scheme for contacts app?

Hi Everyone, So I am trying to write an app that does a person search of my company. When it returns a result, I want to include a feature to add the person to the iPad contacts app with the push of a button. The problem is I can't find a way to launch the contacts app through a custom URL scheme with the person info as parameters. Do...

iPhone Simulator running old version of code with iOS 4

I'm having problems with the iPhone Simulator running an out of date version of my app binary with iOS 4, since it seems Xcode is not killing the process completely, hence the debugger is picking up the app process from the previous build/debug cycle, even if I click the "Kill" button on the toolbar. Does anyone know a way of forcing th...

iOS linking to "ABAddressBook.h"

Hello all, So I suspect this to be a project problem as opposed to a code problem. I am still relatively new to xcode. I am trying to access the ABAddressBook libraries and have included them in the project alright. ![alt text][1][1]: http://i.imgur.com/lBaW0.png Now when I try to say import "ABAddressBook.h", it doesn't know what I...

problem with zoom in UIScrollView on iOS 4.0

Hi, This is a general question to a specific problem. I am using a UIScrollView in an app that displays photographs. on iOS < 4.0, zooming works great. the same app running on iOS 4.0.x has problems zooming. specifically, if the image does not fill the view (and black bands appear at top/bottom), the first zoom is jerky and garbage dat...

Unexpected Error in Instruments using UIAutomation

Hi there, I am currently using IOS SDK 4.0.2 and learning how to do UIAutomation. Unfortunately I found that in the Simulator, when I try running a simple Java script test (that just assigns variables) I get the following error. Unexpected error in -[UIATarget_0x5d04f60 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Frame...

iOS4 ABNewPersonViewController Loses Data Entered when attempting to add a Photo iPhone 4

I have implemented a basic add contact feature to an iOS 4 application. Following the documentation from Apple, I have created a navigation controller, and set its root view to the ABNewPersonViewController. I have implemented the delegate as well. The basic mechanics all work. The problem I am having is when you add a photo to the n...

How to tell when controller has resumed from background?

Hey guys, So I want to support app switching in my upcoming iPhone app and I've implemented all the proper delegate methods in my application delegate. So when the user resumes the application, I can see their activity in the NSLog and all. However, how can I tell my app has resumed a controller? Is there a method I can put in my contro...

Why isn't my keyboard appearing?

I have an application that allows the user to edit multiple text fields and views. Rather than mess around raising each view to the top when the keyboard is active, I decided to instead make one textView for editing and hide/show it when input is needed, then transfer the data when it is done. To move focus to the new textView, I call it...

Application Launch High Res Image

In the apple docs it states The portion is the optional string @2x and should be included only on images intended for use on high-resolution screens What are high-resolution screens? iPhone 4's? Do I need to include one? ...

Failed to create 5th http connection in iOS4

Hi all, In OS3.1.3, I can create 6 UIWebView in a single view to watch 6 MJPEG stream simultaneously. For the same application, it can run in iOS4 without any code modification. But it can only show 4 liveview feed at the same time. And I cannot send any request afterward. Is this a limitation for iOS4 for multitasking? Or I use some...

iPhone 4 apps automatically scale up on iPad?

I thought I read/saw/heard something saying that apps built for iPhone 4's Retina Display would automatically run at 640x960 when installed on an iPad. However, can't find any documentation on that specific feature, and my app still runs at 320x480 when installed on an iPad. Is there a step I've missed to make this happen? Or did I jus...

Problems saving PDF files in iOS4

I want to have my iPhone application create a PDF file and store it in an appropriate place - probably the iBooks folder so it can be easily retrieved using iTunes, but that's a change for later once I have the saving part working. I've followed the PDF saving tutorial on the Apple site to the letter, including swapping out CGContextBegi...

UITableViewCell custom reorder control

Is there any way to change the image of the reorder control that is displayed when the UITableView is in edit mode? I have a UIImage that I’d like to display instead of the usual grey bars. Do I have to subclass UITableViewCell to accomplish this? ...

How do I close a UISearchDisplayController programatically?

I want to close my UISearchDisplayController when the user clicks the "Search" button since I'm loading new data from the web. How do I close the controller programatically? I already have the proper method called, but don't know how to do it. I thought that the below would work, but I'm wrong. - (void)searchBarSearchButtonClicked:(UIS...

UILabel wrong size calculations on iPhone

Hi all, I am adjusting my old apps to iPhone 4 using the simulator at the moment and I can across a very strange behavior with UILabel drawing and sizeWithFont:constrainedToSize: that I currently see only on the iPhone 4 simulator. I am trying to show the following error text to the user: @"Incorrect user name or password" This text si...

How to create a CGPath from a file — i.e. SVG

Is it possible to create a CGPath from a given file? SVG would be preferred, but anything will work. ...

Avaudio player freezes app for 1/2 sec

Hi, I get the following message just before playing an audio file: "AddRunningClient starting device on non-zero client count" This only happens once and never happens again. Anyone knows why this would happen. I only have 1 player. Thanks. ...

[searchbar resignFirstResponder] will lead to "Program received signal: “SIGKILL”."

I have a UITableView, where I extend/shrink the cells with the following code. I save the last 2 indexPaths to perform a reloadRowsAtIndexPaths: on it. Now I added a UISearchBar to the header for section 0. If I tab the searchBar, a KeyBoard is displayed on top of the UITableView — so far so good. But I want the user to be able to touc...