I have a url say : www.gmail.com/index.php. I also have three different strings say aa, bb and cc. I want to append the three separate strings to the url in order to get a combined url in Objective C i.e I want www.gmail.com/index.php/aa/bb/cc .
Can someone help me out ?? I am new to objective C. Thanks.
I have a url say : www.gmail.com/index.php . I also have three different strings
Share
If you are trying to use a URL for later use in retrieving data, etc., you’re going to want an
NSURLobject when you’re done. You can certainly create a URL by appending @”/%@” with the next element, but you should look at doing the following:This is a bit long-winded if you are adding static path elements, but if you are adding computed information it solves the problem of making sure there are appropriate slashes and allows you to use the URL construct directly.