Question: im kind of a noob on objective c and still are having trouble with some basics, in this case
I'm developing a pdf viewer on xcode, but im having a problem adding a integer to my NSUrl variable.

I have several pdf's on my site:

> 
> "http://mysite.com/1.pdf" "2.pdf" etc.
> 
> 
> 

but the number of pdf files allways change so in order to avoid using a NSMutableArray with all the url sites what im trying to make is a NSURL variable like this:

`int numpag = 1;  

NSString *urlAddress = @"http://mysite.com/%d.pdf", numpag;  

[pdfView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlAdress]]];`

is there a correct way to do this?

Thanks in advance

Answer: 
Try;

```
NSString *urlAddress = [NSString stringWithFormat:@"http://mysite.com/%d.pdf",numpag];

```
```
int numpag = 1;
NSString *baseURLStr = @"http://mysite.com/";
NSURL *url = [NSURL URLWithString:[baseURLStr stringByAppendingFormat:@"%d.pdf", numpag]];

```