这下面是我的代码NSURL返回空值
NSString *string = [NSString stringWithFormat:@" http://abc.com /Demo/View.php?drinkId=%@&name=%@&comment=%@&date=%@&rating=%@& ReqestType=SubmitComment",DrinkId,Name,Comment,Date,Rating];
NSURL *url = [[NSURL alloc] initWithString:string];
在这里,在字符串存在的价值,但URL返回零。 任何人都可以告诉为什么发生这种情况。
感谢....
“这是行不通的,所以这里是我做了什么,而不是”
NSString *string = [NSString stringWithFormat:@"http://abc.com/Demo/View.php?drinkId=%@&name=%@&comment=%@&date=%@&rating=%@&ReqestType=SubmitComment",DrinkId,Name,Comment,Date,Rating];
NSURL *url = [[NSURL alloc] initWithString:string];
高兴的是,我的回答帮助。你能帮助大家解决这个问题吗? –
你会告诉我锄头来回答这个问题吗? – Vijay
您单击答案旁边的灰色复选标记,使其变为绿色。 –