ios4

UISwitch and UITableViewCell iOS4

Hi All, Caveat: I have looked for the answer to my question and several come close, but I'm still missing something. Here is the scenario: I want a way to create UITableViewCells that contain UISwitches dynamically at run time, based on the data in a table (which I can do). The problem becomes connecting the switches such that I can...

Unused variable warning on for each loop

I've got an array of NSNumber objects created thusly: myArray = [[NSMutableArray alloc] initWithObjects:[NSNumber numberWithDouble:0.0], [NSNumber numberWithDouble:0.0], [NSNumber numberWithDouble:0.0], [NSNumber numberWithDouble:0.0], [NSNumber numberWithDouble:0.0...

Please help with Picture saving problem in iPhone 4 or iOS 4

Dear all,     Our team got some very strange problem and we have been try to solve it for a while, however, we cannot get it done, we hope somebody here can share of of your talents to help us. The problem is, we have a photography app, which works in iPhone 3G and iPhone 3Gs, however, for quite a few iPhone 4 users (Not every one, for ...

Best Practice - iPhone Background Application Mode

I'm currently testing the latest iOS4 Feature to put my location aware app in the background. Well, it does work! But on the other hand it's quite hart to handle the immense power usage. The app consumed about 50% battery power in the last four hours. It read the entire official documentation by Apple on this topic but I'm still not su...

iOS Application Terminates After Exception Thrown in UITableViewDataSource Method

Having meticulously followed the examples and instructions in the Table View Programming Guide for iOS about the proper order in which UITableView delegate and data source methods are called, I thought I had a good idea of how to implement the “handshake” shown in Figure 7-1 and the list that follows, but apparently not. Here's the code...

Do you have to declare overriden @property methods in the .h file?

Hello, Beginner question here. In the .h file of an objective c class.. If you have an @property int someVar; for example.. and you're actually going to write the setter method yourself in the .m file.. do you still have to declare that setter method in the .h file? If you have some @property declarations in the .h file and you are w...

How to find iOS 4 only code in iPhone project

Hi i have a iPhone Project with Base SDK 4.0 and Deployment Target set to 3.0 with XCode 3.2.3. Is there an "easy" way to find out whether i use iOS 4 only API calls in my Source Code. I'm aware that i could install an old XCode to run my project against an e.g. 3.1.3 Simulator, but i hope there is a simpler way for checking this. Any...

iPad Universal Binary - problem with MessageUI.framework

Hello all, I'm in the process of turning one of my iPhone apps into a universal binary. Everything works ok accept for the MFMessageComposeViewController Class. I went the single project with two targets route. When I run the iPad Target, the compiler flags the MFMessageComposeViewController. Obviously, this was introduced in 4.0 but ...

UITableView Section Index not working as expected

When I add a section index consisting of "A", "B", ..., "Z" to my UITableView, everything works fine in the iPhone simulator. In this case, I get A, B, C,..., Z displayed in a horizontal line on the right hand side of my UITableview. If I add a 27th element (e.g. "Other") to the section index titles, the section index will now show A,*...

iPhone playing sounds while in the background

Hi, I have a small application which is much like a clock. It has been working great on IOS3, but now I am updating it to iOS4. What I want to do in iOS4 is to let it play a sound any giving time. For instance, if I set it to play at 4.00 PM I want it to play a sound, a sound from the application not from the OS. This works if the app i...

UILocalNotification several soundName

Hi, I have a UILocalNotification in my app but I want to play several sounds after each other. I can't find that my app can solve this, due to that my app is in the background. So what I want to know is if one can play several sounds and repeat them until the user has pressed "cancel" och "view", or if there is a delegate in my app th...

[iPhone] UIImagePickerController on iPhone 4 device

Hi @ll! This is no typical programming question. I am currently developing an app using the latest SDK. This app will use the UIImagePickerController for taking pictures with the built-in camera. I know the new iPhone 4 has 2 cameras built in. But the simulator doesn't support the camera in any way, so there's is now way to test the cam...

What is the fastest way to write images captured from camera to the Photos album on an iPhone?

I'm currently using writeImageToSavedPhotosAlbum:orientation:completionBlock: and it is taking a little over 3 seconds to write an image to the Photos album ... whereas the standard Camera app seems to persist images much faster. So, what is the fastest way to write files to the default Photos album? I'm not sure what all my options ar...

Can I make my iPhone app start with a file in its Documents directory?

During development, I'd like to have an XML file in my iPhone app's Documents directory when it starts. Is this possible? Having read this answer, I tried adding a Run Script build phase, but I can't find an environment variable that points to the application's home directory after installation. To be clear, the directory I want to mo...

Still having difficulty swapping between views properly.

I have an app that uses a number of views, and it was getting pretty awkward swapping between them so I thought it might be an idea to make some code that would automatically go to a numbered page, load the appropriate view, then perform any setup that needed doing based upon that view. I came up with the following. The test page I've se...

iOS AutoResetEvent?

I'm trying to find a class like C#'s AutoResetEvent for iOS. Does anyone know of something similar? (I want to be able to wait/signal on an object). ...

Xcode 4 - removing "Default.png"

Possible Duplicate: Can't remove Default.png? I am using Xcode 4, but I am sure the issue does not pertain to this specific IDE. I have set a "Default.png" using the organizer, but I would like to remove it. At the time I had already created an image in my project which was no longer being used, instead replaced by the image...

Issue when resizing UIWebView using animation

Hi everyone. I've been struggling with this for a while and have not found a solution. I'm resizing a UIWebView using animations through beginAnimations: and commitAnimations. All goes well, except for when the resizing tries to make the UIWebView larger. Let me make this clearer. Suppose the current frame of my UIWebView is (0, 0, 32...

Does an In App Purchase's Product ID have to begin with a Reverse-DNS?

Does an In App Purchase's Product ID have to begin with a Reverse-DNS like com.mycompany.My_Awesome_Game.Level_Pack_1 or can it just be standalone like Level_Pack_1? ...

Checking if UIGraphicsBeginImageContextWithOptions is supported

I'm working on an iOS app. It currently only works on iOS 4 since I use the following method on several occasions: "UIGraphicsBeginImageContextWithOptions". This method is only available in iOS 4 and therefor my app currently crashes/doesn't work on iPhone OS 3. Aside from this method there is no reason why the app should not work on iPh...