I’d like to launch a URL in Safari from UIView sending POST datas. This would allow me to load my Paypal page.
Normally, in HTML we have to do this :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="text-align:center;" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXXXXX">
<input type="submit" value="Faire un don" id="donpaypal">
</form>
I know that I can open a new URL with this few lines :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http:://I.have.a.beautifull.website.com"]];
Is there a mean to specify POST datas OR would you have a mean?
I suggest you to implement your custom browser using a UIWebView.
A UIWebView can load a NSURLRequest.
Have a look at the following code