iphone

NSURLConnection and empty post variables

I'm at my wits end with this one, because I've used very similar code in the past, and it worked just fine. The following code results in empty $_POST variables on the server. I verified this with: file_put_contents('log_file_name', "log: ".$word, FILE_APPEND); the only contents of log_file_name was "log: " I then verified the PHP ...

UIResponder Delays

I have a UIView subclass that overrides UIResponder's touchesMoved: message. I've noticed that when I swipe my finger very quickly across the UIView, my touchesMoved: message only gets called every so often and not constantly getting messaged. Any ideas? Thanks. ...

KeyboardWillShow with UITextView

Here's the setup: I have a textView (txtReply) where the user puts information I have a UIView that contains a scroll view and some labels, as well as the textView (ChatView) When the user selects the textView, then it brings the keyboard up. I use 'keyboardWillAppear' to move the 'ChatView' up so that the text view is still visible. I t...

What you need BEFORE you submit your iPhone app to Apple

When submitting a new app to the iPhone app store, which of these are mandatory, and which are optional? (Free apps... or paying apps.) A bank account with direct deposit access. An email address to give out to the public. An email address for Apple to contact me. A support website. A company name. A support phone number for the publi...

UIViewerTableViewController.m:15: error: expected identifier before '*' token

I am new to objective-c programming. I come from a C# background. I am having problems with the following code I am writing for a proof of concept for an iPhone App: I am getting a number of compile errors but I think they are all due to the first error (could be wrong) - error: expected identifier before '*' token (@synthesize *lists...

Is there a way to have a list of all the currencies from the iphone api?

I wanted to allow the user to choose a currency from a list of currencies. Do i have to hardcode all the currencies in the code or can i get it from the api, somehow. ...

iPhone. Shouldn't hitting the home button cause UIApplicationDelegate's dealloc to be called

I have put NSLogs in all my classes including my UIApplicationDelegate subclass. I am curious - and a bit nervous - about why I am not seeing them echo anything when I press the home button. I am running in the XCode simulator. Since iPhone/iPad runs a single app at a time, doesn't hitting the home button discard all traces of the runni...

NSXMLDocument replacement on iPhone?

I have an seen how NSXMLDocument can parse and html document, and provide easy methods for returning parts of the html structure. Is there a similar method that can be used for the iPhone, as NSXMLDocument is not available? ...

viewDidAppear called when popping navigationController

I'm having a bit of a problem with the viewDidAppear: method. I have a tabBarController with navigationControllers on each tab, and I have an action that requires that all the navigation controllers pop to their rootViewControllers (programmatically). The problem is that when they pop each navigation controller, the rootViewController's...

Correct way of showing consecutive modalViews

I have two views that need to be shown modally, one after the other. This doesn't work if we dismiss and show consecutively, like this: [rootController dismissModalViewControllerAnimated: YES]; [rootController presentModalViewController: psvc animated: YES]; The second modal view simply doesn't show up. I've seen a fix that was somet...

Presenting an image cropping interface

I'm trying to engineer a UI for cropping images in iphone OS and suspect I'm going about things the hard way. My goal is pretty much what the Tapbots duo have done with Pastebot. In that app, they dim the source image but provide a movable and resizable cropping view and the image you're cropping is in a zoomable scrollview; when you res...

Navigation bat not displayed at top of page. What's wrong?

I'm having what appears to be a simple problem. I declare a navigation controller but the navigation bar that comes up is not displayed at the top of the page. http://sphotos.ak.fbcdn.net/hphotos-ak-snc3/hs410.snc3/24784_889732028002_28110599_54506042_4580563_n.jpg I declare the navigation controller like so... UINavigationController...

UITableViewIndex Grows to Incorrect Bounds Unexpectedly

I have a standard UITableView + UISearchDisplayController + UITableViewIndex setup. Everything works like a champ. Except, under very specific conditions, the index grows too long to display on the screen. Specifically, after ending a search and re-displaying the unfiltered, indexed table, the index sometimes grows too long. More speci...

How can I release this NSXMLParser without crashing my app?

Below is the @interface for an MREntitiesConverter object I use to strip all html tags from a string using an NSXMLParser. @interface MREntitiesConverter : NSObject { NSMutableString* resultString; NSString* xmlStr; NSData *data; NSXMLParser* xmlParser; } @property (nonatomic, retain) NSMutableString* resultString; - (NS...

Avoiding EXC_BAD_ACCESS when using the delegate pattern

A have a view controller, and it creates a "downloader" object, which has a reference to the view controller (as a delegate). The downloader calls back the view controller if it successfully downloads the item. This works fine as long as you stay on the view, but if you navigate away before the download is complete I get EXC_BAD_ACCESS. ...

Draw a smooth line with finger touch on iPhone

Hello Everyone, How do I draw a smooth line with a finger slide/touch motion on the iPhone? I have the following code but it is not smooth. It makes corners/turns for example when I try to do a circle. I think I have to use OpenGL. Any ideas? sample code? tutorials? Thanks! UIGraphicsBeginImageContext(self.view.frame.size); [draw...

Saving data - does work on Simulator, not on Device

I use NSData to persist an image in my application. I save the image like so (in my App Delegate): - (void)applicationWillTerminate:(UIApplication *)application { NSLog(@"Saving data"); NSData *data = UIImagePNGRepresentation([[viewController.myViewController myImage]image]); //Write the file out! NSArray *paths = NSSe...

Is stringByTrimmingCharactersInSet: an autoreleased string?

I can use the following codes to trim a string: -(void) aMethod { // myStr from a text box NSString *trimedStr = [mystr stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]]; ... // should I release trimedStr? } Not sure if the result trimedStr is an autorelease string? How can I find out that? ...

iPhone: Turning latitude/longitude into "major cross-streets"

Using the MKReverseGeocoder or GoogleAPI or MapKit... Is there a simple way to turn a latitude/longitude into "nearest major cross-streets"? A user might not have any idea where "12345 Pineapple" is located... so I want to show something like "Pineapple and Main"... or (larger, major roads) like "US-140 and Hwy 76". I don't really ca...

Buttons IBAction doesn't work inside MKAnnotation view, why ??? Any Idea ??

I am having MKAnnotationView and i have added UIButton to it, by addSubView method with IBAction assigned to it using addTarget method. But when i tabbed on that button IBAction doesn't called ....! I am not getting, Why it is not working? How can i add button to MKannotationView so that its IBAction called ??? Plz. help me. Thanks ...