小编GR.*_*GR.的帖子

如何在objectiveC中将NSUInteger值转换为int值?

如何在objectiveC中将值转换NSUIntegerint值?

以及如何打印NSUInteger价值NSLog,我试过%@,%d,%lu这些不起作用,并抛出Ex-Bad Access错误.

谢谢

int objective-c nsuinteger ios

26
推荐指数
1
解决办法
6万
查看次数

如何将Button Action连接到Tabbar Viewcontrollers

我是iPhone开发的新手.我正在开发一个TabBarViewcontroller应用程序(iPhone和iPad),我已经创建了一个LoginViewController和一个按钮动作.我的期望是点击该按钮后,控件将从中移动LoginViewControllerTabBarViewController.在这里TabBarViewcontroller我有5个Tabbar(项目)ViewControllers.可能吗?

如果可以,请分享您的想法.

iphone objective-c ipad ios

5
推荐指数
3
解决办法
761
查看次数

ios-Soap方法通过http post请求调用,但响应为空

xx我是iPhone新手.在我的应用程序Soap方法用于导入和导出数据..虽然导入工作正常但导出不工作soap Web服务的响应是空的..

//参数

NSString *cust=@"<NEWCUSTOMERS><NEWCUSTOMER></NEWCUSTOMER></NEWCUSTOMERS>"; 
    NSString *trans=@"<TRANS><TRAN></TRAN></TRANS>";
    NSString *RETURNS=@"<RETURNS><RETURN></RETURN></RETURNS>";
    NSString *prepayment=@"<PREPAYMENTS><PREPAYMENT></PREPAYMENT></PREPAYMENTS>";
    NSString *receipt=@"<RECEIPTS><RECEIPT></RECEIPT></RECEIPTS>";
    NSString *spcode1=@"BB";
    NSString *companyShortName=@"Sample Company Limited";
    NSString *companyCode=@"01";
Run Code Online (Sandbox Code Playgroud)

//肥皂网址:

    NSURL *url = [NSURL URLWithString:@"http://xxx.xxx.xxx.xx/SAAP/SOAP.asmx"];
Run Code Online (Sandbox Code Playgroud)

// SOAP Methos:

    NSString *soapMsg=[NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
                       "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
                       "<soap:Body>"
                       "<PostXMLStr xmlns=\"http://tempuri.org/\">"
                       "<cust>%@</cust>"
                       "<tran>%@</tran>"
                       "<ret>%@</ret>"
                       "<ppay>%@</ppay>"
                       "<recp>%@</recp>"
                       "<sCode>%@</sCode>"
                       "<companyShortName>%@</companyShortName>"
                       "<companyCode>%@</companyCode>"
                       "</PostXMLStr>"
                       "</soap:Body>"
                       "</soap:Envelope>",cust,trans,RETURNS,prepayment,receipt,spcode1,companyShortName,companyCode];

    NSMutableURLRequest *requests = [[NSMutableURLRequest alloc] initWithURL:url];
    NSLog(@"soapMsg= %d soapMsg=%@",soapMsg.length,soapMsg);
    NSString *msgLength = [NSString stringWithFormat:@"%d",[soapMsg length]];
    NSLog(@"msgLength=%@ ",msgLength);

    [requests addValue:@"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
    [requests addValue:@"chunked" forHTTPHeaderField:@"transfer-coding"];
    [requests addValue:msgLength forHTTPHeaderField:@"Content-Length"]; …
Run Code Online (Sandbox Code Playgroud)

iphone soap objective-c http-headers ios

5
推荐指数
1
解决办法
1763
查看次数

标签 统计

ios ×3

objective-c ×3

iphone ×2

http-headers ×1

int ×1

ipad ×1

nsuinteger ×1

soap ×1