如何在objectiveC中将值转换NSUInteger
为int
值?
以及如何打印NSUInteger
价值NSLog
,我试过%@,%d,%lu
这些不起作用,并抛出Ex-Bad Access错误.
谢谢
我是iPhone开发的新手.我正在开发一个TabBarViewcontroller
应用程序(iPhone和iPad),我已经创建了一个LoginViewController
和一个按钮动作.我的期望是点击该按钮后,控件将从中移动LoginViewController
到TabBarViewController
.在这里TabBarViewcontroller
我有5个Tabbar(项目)ViewControllers.可能吗?
如果可以,请分享您的想法.
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)