我正在使用NSMutableURLRequest并传递帖子数据,我正在调用URL
请找到以下代码:
NSDictionary *parameters = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:currency_code,APIkey,merchant_ID,checksum_method,authorize_user,ip_address,hash,NB,nil] forKeys:[NSArray arrayWithObjects:@"currency_code",@"APIkey",@"merchant_ID",@"checksum_method",@"authorize_user",@"ip_address",@"checksum",@"cardType",nil]];__block Nsstring *post = @"";[parameters enumerateKeysAndobjectsUsingBlock:^(ID key,ID obj,BOol *stop) { if ([post isEqualToString:@""]) { post = [Nsstring stringWithFormat:@"%@=%@",key,obj]; } else { post = [Nsstring stringWithFormat:@"%@&%@=%@",post,obj]; }}];NSData *postData = [post dataUsingEnCoding:NSUTF8StringEnCoding allowLossyConversion:YES];Nsstring *postLength = [Nsstring stringWithFormat:@"%ld",[postData length]];NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];[request setURL:[NSURL URLWithString:@"http://pay.sandBox.shmart.in/pay_merchant/Js"]];[request sethttpMethod:@"POST"];[request setValue:postLength forhttpheaderFIEld:@"Content-Length"];[request setValue:@"application/x-www-form-urlencoded" forhttpheaderFIEld:@"Content-Type"];[request sethttpBody:postData];[webvIEw loadRequest:request];
webVIEwDIDFinishLoad也被调用,但它显示我一个空白的白色屏幕.
什么是问题的任何想法.
以上是内存溢出为你收集整理的ios – 即使在加载网址后,UIWebview仍显示空白屏幕全部内容,希望文章能够帮你解决ios – 即使在加载网址后,UIWebview仍显示空白屏幕所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)