iphone

unable to allocate 4 buffers of 20 mb of memory in app on ios 4 but could in ios 3

I wrote an app compiled against ios 3 that would easily allocate up to 100 mb of memory for image processing purposes. However, when that same app was compiled against the ios 4 sdk, I found that it crashed when many apps were open in the background. When I kill the background apps, the application then runs fine. I reduced the memory us...

iPhone SDK - UIButton not working in custom view

This is driving me nuts... I've seen a few posts on similar issues but can't seem to make it work, so here it is: it is a very simple example, I am just creating a custom UIButton in a custom view, then assigning it a custom action to respond to touch events. When I run the app, the button is created, but nothing happens when I try to c...

Problem with nsurlconnection timeout.

I've got a wierd problem with NSURLConnection. I've set the connection time out of 20 seconds like this. NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0]; NSURLConnection *con= [[NSURLConnection alloc] initWithRequest:request delegate:self]; I'm implementing ...

Background mode server communication drains battery

I developed an app that makes a photo and submits it with some text to my web service. Now when my app is running (even in a background mode) the battery drains in 4 hours and my iPhone is getting really hot. I thought it may be a problem with the device but after visiting an Apple Store they said the battery is fine and that the proble...

adding new TableViewCell only at the last row of a table.

Hi, I've tried looking it up here... but could see more questions like that one, but no answers. I'm trying to add a new cell at the bottom of my table (add 1 more cell to the end) the cell should be different from the rest of the table cells, so I've created a new NIB with tableCell. i've used this way to find the last cell in my tab...

remove the spaces betwwen the tags in local xml file in iphone sdk

Hi I am having an xml named test11.xml now when i pasrse the data into CXML there are spaces in the parsed xml i want to remove these space .. Kindly Find my xml data as below thanks <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?mso-application progid="Word.Document"?> <w:wordDocument xmlns:w="http://schemas.microsoft.c...

iPhone app Facebook Picture Upload

Hi all, I have another question. I want to upload a picture to Facebook. I have found some tutorials to do this. I've read that you need to register your app first on facebook. Is this absolutly necessary to test the functionality? My app isn't finished at all and I just want to test if it works. ...

ihow to acees random items from an array and then put them in another array in iphone sdk ???

i have a problem i have an array which has ten items "one" to "ten" i want to get randon items from this array and put them in a new array which can display the random items ...

Check for collision of ball in a circular path and a stationary object on the path for iPhone app

I have set a ball on a circular path by animating its layer. When i checked for collision with another object, I tried use CGRectIntersectsRect but to no avail. What is the difference between a layer and the frame? I suspect that the frame is not following the layer animation hence CGRectIntersectsRect is not something that I should be ...

comparing the action in iphone

user can only listen to three songs before he/she has to login or else they won't be able to listen anymore. for that can I compare IBAction like that (if(IBAction < 3)he stop and he have login for more song. This same question as I Ask before I am trying to solve that give me hint to do. thanks in advance ...

cannot add image files to xcode resourse folder....

hi friends.. I tried adding images to my xcode resourse folder by drag and drop. But its showing me the error cannot add the image... can anyone tell me what is going wrong... i had previously added images like this and that had worked .but now its not working... ...

Sharing variables amongst 2 ViewControllers

Hello, Here is a simple one for you guys . I'm defining a class to store variables in so I can reuse those variables in different ViewControllers . Here is how I do it, it`s obviously not working ( that's why I'm asking a question ... ): I declare a class : VariableStore.h @interface VariableStore : NSObject { int evTe; } @pr...

regarding tab bar controller

I want to show more tahn four tab bar item on tab bar controller by scrolling tab bar . is it possible in iphone if it is.. please give the exact solution.?? Hoping your positive response ...

what is searchdisplaycontroller?

hi when i give IBoutlet objects in my viewcontroller, i could not find out them in interfacebuilder to link to the object which are in view.....after sometime it come automatically..(i have set correctly file owner)....there is only one i am seeing searchdisplaycontroller....what is it ...?why after some times it corrected......any help...

Why is CGImageCreateWithMaskingColors() returning nil in this case?

When I use the following code: UIImage *image=[UIImage imageNamed:@"loginf1.png"]; CGImageRef rawImageRef=image.CGImage; const float colorMasking[6] = {222, 255, 222, 255, 222, 255}; CGImageRef maskedImageRef=CGImageCreateWithMaskingColors(rawImageRef, colorMasking); maskedImageRefis always nil. Why is this, and what can I do to co...

How to build user interaface close to the iBooks one?

hi, I'm new in iPad applications and I want to build an application that has a user interface close to the one that has been used for iBooks, or the one that Apple uses for the iPhone and iPad operating systems, so is there any component in Cocoa that makes it easy for me, in fact I thought about the UIImagPickerController but I'm sure y...

Developing for iPhone OS 3 and 4 on XCode 3.1.2

Hi Everyone, I am new to iPhone programming and have a MacBook running Leopard with XCode 3.1.2. I want to use CoreData to read and write to plists, but I read on http://tapity.com/iphone-app-development/readwrite-data-on-the-iphone-property-lists-sqlite-or-core-data/ that CoreData is only available on iPhone OS 3.0. Right now, I am dev...

UIWindow animation

Hello, I currently use a custom UIWindow to display a custom alert view to make it look Apple style. When I remove it, it doesn't fade automatically, sk I decided to use a UIView animation and change the alpha to 0 then remove it but that still didn't do the trick. Would you guys know what to do? ...

Problem in writing to a file in application bundle.

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectoryPath = [paths objectAtIndex:0]; fileName = [documentsDirectoryPath stringByAppendingPathComponent:@"user.txt"]; NSFileHandle *myHandle = [NSFileHandle fileHandleForUpdatingAtPath:fileName]; ...

iphone how to convert my app to retina display app

How can I convert my current application to retina display app and I've to make sure that the same app works in iphone 3 as well. If its just to update my images to high resolution, it will also work in iphone 3. then there will be no meaning for "retina display" app. ...