我在IBAction中有这个代码:
NSString *strURL = [NSString stringWithFormat:@"http://www.brmyapps.com/folder/folder/registerpost.php?first_name=%@&last_name=%@&titulo_noticia=%@&comments=%@&idpub=%@&dataevento=%@&email=%@", self.textnome.text, self.textimg.text, self.texttitulo.text, self.textnoticia.text, self.textid.text, self.textdata.text, self.textemail.text];
self.aWebView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
self.aWebView.autoresizesSubviews = YES;
self.aWebView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
[self.aWebView setDelegate:self];
NSString *urlAddress = strURL; // test view is working with url to webpage
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.aWebView loadRequest:requestObj];
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
[[self view] addSubview:_aWebView];
我的问题是,当我点击按钮时,打开UIWebView但我想打开的php url发送数据到php是不加载的。仅显示空白页面。
我该如何解决这个问题?