Here Below is my code
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];
Here in string there is value but url returns nil. Can Anyone tell why this happened.
Thanks ....
"This won't work, so here's what I did instead"
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];
See Question&Answers more detail:os