iphone

UINavigationItem with prompt and activity indicator

I'm wondering how Apple implemented the UINavigationItem that contains an activity indicator (see attached image below), above the title. Is this Apple's private API that allows to do that? If not, how can it be reproduced in an application. http://img218.imageshack.us/img218/8819/img0133g.png Thanks! ...

NSInputStream and stream:handleEvent:

I'm using a NSInputStream and stream:handleEvent: to receive blocks of data from a socket. Each block of data is the content of a struct. My problem is that when stream:handleEvent: is invoked, it's possible that not enough data is available to completely fill my struct. It's also possible that many blocks are available but again not en...

iPhone: Send in-app email without prompting for mailcomposer to show up?

I have no problem sending emails from within my app. Right now it requires: User presses an email button. presentModalViewController brings up the email view (with pre-defined To:, Subject:, and Body:) User presses "Send" Email is sent. dismissModalViewController removes email view. Can I somehow make it: User presses an email but...

Can Any One Tell me i have used this code for Paypal Integration but i get falure in Response?

-(IBAction)btnsendPressed:(id)sender { NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<SOAP-ENV:Envelope xmlns:xsi= \"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\...

How do I reference the managedObjectContext in my App Delegate from my View Controller?

Hi, I know there are other questions covering this topic, but none seem to fit exactly what I'm experiencing, hence the new question. I have an app which is a UITabBarController, I have defined two subviews Both tabs have their Class attribute in the Identity Inspector set to UINavigationController. Both subviews are Class UIViewContr...

While Integrating Paypal why i got this Error?

Please Anyone can tell me why i got this kind of error: ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAGE0=Method%20Specified%20is%20not%20Supported&L_SEVERITYCODE0=Error ...

Problems with Xcode Syntax Highlighting

In Xcode 3.2.1 I have this problem where it stops highlighting Objects in purple, and such. For example: In that example, NSAutoreleasePool, pool, img, size, width and height should be highlighted, however, they are not. Here is a screenshot of what that looks like. Anyone know how to fix this? Edit: Also, code sense isn't showing c...

iPhone: How to skip preview mode in imagePickerController?

Hi I am developing an iphone app using camera. How to skip preview mode in imagePickerController? This mode asks whether to use or retake. I think it is unnecessary step for my application. 1) How to bypass the preview mode? Is there no standard way? 2) The one way I know is screen capture. But I don't prefer because it gives lower ...

Finding leaks under GeneralBlock-16?

If ObjectAlloc cannot deduce type information for the block, it uses 'GeneralBlock'. Any strategies to get leaks from this block that may eliminate the need of my 'trial and error' methods that I use? The Extended Detail thing doesn't really do it for me as I just keep guessing. ...

UIImage Saving image with file name on the iPhone

How can I save an image (like using UIImageWriteToSavedPhotosAlbum() method) with a filename of my choice to the private/var folder? ...

How to check is GPRS is available

Is there any way to check whether GPRS is available on the iPhone? I've written code that checks whether WiFi is available, but I don't know how to do this for GPRS. ...

Detect a finger swipe through JavaScript on the iPhone and Android

How can you detect that a user swiped his finger in some direction over a web page with JavaScript? I was wondering if there was one solution that would work for websites on both the iPhone and an Android phone. ...

iPhone app can find nib file when running in Debug configuration but not in Release configuration

I have developed an iPhone app using the navigation controller structure. The active SDK is set to iPhone Simulator 3.1.2 (Base SDK). When the Active Configuration is set to Debug, it works. However, when the Active Configuration is set to Release, the app crashes when it tries to load the second view controller. Here is error message: ...

Rounded UIView using CALayers - only some corners - How?

Hello ! every one. In my application - there are four buttons named as follows. Top - left Bottom - left Top - right Bottom - right Above this buttons there is an image view / or we can use also UIView. Now, suppose user taps on - top - left button. Above image / view should be rounded from that particular corner. I am having som...

UIScrollView.zoomScale and UITableViewCellStyle errors for OS2.2.1

Hey, When i debug my application in Simulator-2.2.1 i get the following errors which i surprisingly don't get while debugging in Simulator-3.1.2 : in my code for UITableViewController implementation file i am using the method: -(id)initwithStyleUITableViewCellStyle)style reuseIdentifierNSString *)reuseIdentifier for which i get t...

Using a REST API and iPhone/Objective-C

So I'm brand new to Netflix's API and have never used an API ever before. I'm ok with Objective-C and Cocoa Touch but just have no clue where to start when accessing the API and how to in general. Can someone help me get started with some code that will access titles in Netflix or just how to access a REST API in general with authenticat...

Annimation in iphone inside for loop not working

Hello friends, I am currently developing an application in iphone, i want to animate some images on screen and for the same i have written this code for (int i = 1 ; i <= 5 ; i++) { imgview.image = [UIImage imageNamed: [NSString stringWithFormat:@"spleshScreen%d.png", 1]]; NSLog(@"i = %d" , i); [UIView beginAnimations:nil context:...

How to accurately sync time between iPhones?

I am writing an application that will require me to sync the time on a large number of iPhones accurately (to within a fraction of a second). As far as I can tell, access to the time function of the GPS is not available. If I sync over the Internet, then the biggest problem is network latency. The delay before the answer to a request is ...

Memory Leak warning I can't solve

The static analyzer is showing up a leak in this block of code (specifically the link with the copy in it): - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"item"]) { [elements setObject...

Severe memory problems with UIImagePickerController using Camera

I've noticed that when I load a UIImagePickerController and I take a picture with it, didReceiveMemoryWarning is called. Also, in Instruments, there is a significant memory leak (not by me, I swear!). I've heard that this is a problem with UIImagePickerController but, I'm not sure how to fix it. Here is my implementation of UIImagePicker...