iphone

Is it possible to populate HTML form field data in an iPhone UIWebView using external accessory framework?

I have an iPhone app where I'd like to load a remotely served HTML form into a UIWebView and then populate that form as data becomes available from an external accessory using the "External Accessory Framework." Right now the data is entered by hand. The proposed flow is: Fetch an HTML page containing a form and put it into a UIWebVi...

Adding picture in pickerview

UIImageView *one = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ball1.png"]]] ; UIImageView *two = [[UIImageView alloc]initWithImage:[[UIImage alloc] initWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathCompon...

Getting data from UITableView

Hi, I have a few custom UITableViewCells - http://img11.imageshack.us/i/customfacilitiescell.png/ which are added to this UIViewController - http://img189.imageshack.us/i/facilitycontroller.png/ Now, on clicking a button in the controller, I'd like to get the on/off status of all the UISwitches in the controller. Thanks, Teja ...

Three20 monotouch/btouch examples?

Hey Does anyone know of any examples or tutorials working with the three20 btouch dll? I have no idea where to start! w:// ...

Validate NSString

I am validating an NSString to ensure that the string does not contain apostrophes. The code I'm using to do this is NSCharacterSet * invalidNumberSet = [NSCharacterSet characterSetWithCharactersInString:@"'"]; NSScanner * scanner = [NSScanner scannerWithString:string]; NSString * scannerResult; [scanner setCharactersToBeSkipped:nil]...

iPhone: CALayer Memory Leak question

Would the code bellow cause my code to leak? More specifically, am I responsible for releasing the newImage or the contents of mainPageLayer (which is a CALayer object)? I get a memory warning every 4th time that method is called, but cant figure out why... I also can't figure out why mainPageLayer.contents = [newImage CGImage]; throws ...

How to tell if a user updated my app or installed a new one

I need a way to tell if the app being used by a user is a fresh new install (new user), or was a pre-existing user who updated. The previous app version did not track UDID's, and didn't save anything (it just ran as a simple app). Is there a way for an update to tell if the user previously installed the app? Even if that app didn't sav...

Why would a file created and stored in the iPhone Documents directory be inaccessible when rerunning my application?

This is driving me crazy! I would really appreciate your help... My app saves a .png (referencing a photo taken within the app) to a file in the iPhone Documents directory. The app then creates and displays a UIImage from the file with no issues - but only until the app is rerun an arbitrary number of times. I think this may be related ...

How can I parse raw email source and extract the HTML part?

In my iPhone app, I'm handed the raw source of an email, in RFC822 (or "eml") format. I'd like the HTML part of this message (if one exists). Rather than attempting to parse it out myself and converting escape chars and so on, I thought I'd check to see if anyone knows of an objective-c library to do this for me. In .NET, I've always u...

How to scroll table view with toolbar at the top of the view

Hello, I have a view with a toolbar at the top and a table view with text fields in it's cells. When I want to edit the text fields placed in the bottom of the table view the keyboard is hiding the text field being edited (as the table view is not scrolled up). I tried to implement http://cocoawithlove.com/2008/10/sliding-uitextfields-...

How to get indexPath.row at textFieldDidEndEditing

Hey all, i use some code for inline cell editing from Apples TaggedLocations Example and im now stuck. At the demo Code they save the changes at textFieldDidEndEditing, this works because they asume to edit only the first element in a table view. I have to edit every row at the table view, so my problem is how to get indexPath.row to ...

What does this Obj-C "unrecognized selector sent to instance" exception indicate?

What does this mean? * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSPathStore2 hidesBottomBarWhenPushed]: unrecognized selector sent to instance 0x1cd3d0' ...

Passing touch events on to subviews

I have a view within a UIScrollView that loads an additional subview when the user presses a certain area. When this additional subview is visible, I want all touch events to be handled by this - and not by the scrollview. It seems like the first couple events are being handled by the subview, but then touchesCancelled is called and the...

iphone - generic question about objects

I have several UIImagesView and I put them on a MutableArray. The MutableArray is retained. I add them also as a subview of a view. After adding each UIImageViews on a view I release them... for example... [myView addSubview:myImageView]; [myImageView release]; If I am not wrong, each imageView has now a retainCount of 2, because the...

how to insure MFMailComposeViewController doesnt send mail when body is not empty?

I have MFMailComposeViewController in my app in order to allow the user easily email me about suggestions and feedback on the app but I get about 3 emails a day which are just empty in the body or just the users email signature. Is there any way of checking if the body of an email is not empty before it is sent with MFMailComposeViewCon...

What this bug indicates ? and How to solve it ??

Program received signal: “0”. ...

how to send parameters to a web Services via SOAP?

Before I start: I'm programming for Iphone, using objective C. I have already implemented a call to a web service function using NSURLRequest and NSURLConnection and SOAP. The function then returns a XML with the info I need. The code is as follows: NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\...

Several Objective-C objects become Invalid for no reason, sometimes.

- (void)loadLocations { NSString *url = @"<URL to a text file>"; NSStringEncoding enc = NSUTF8StringEncoding; NSString *locationString = [[NSString alloc] initWithContentsOfURL:[NSURL URLWithString:url] usedEncoding:&enc error:nil]; NSArray *lines = [locationString componentsSeparatedByString:@"\n"]; for (int i=0; i...

Trying to launch App Store - getting ""in something not a structure or union" error

I am trying to launch the App Store without launching Safari with all the redirects and I am getting an error about "Request for member 'iTunesURL' in something not a structure or union." I am new to a lot of this so thank you for being patient with me. I think it has something to do with me calling "self.iTunesURL" since it doesn't th...

Loading a UIView with a UITableView from another NIB

I have a NIB that contains a UIView. I have another NIB that contains a UITableView. How can I load the UITableView NIB inside of the UIView in my other NIB? ...