nsstring - out of scope
- by alexeyndru
-(void)loadWebAdress:(NSString*)textAdress {
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
adressurl=[NSString stringWithFormat:@"http://%@", textAdress];
NSURL *url=[NSURL URLWithString:adressurl];
NSURLRequest *requestObj=[NSURLRequest requestWithURL:url];
[webview loadRequest:requestObj];
}
although url takes it's value from adressurl, adressurl is all the time out of scope when checked in debugger. what is going on? i would like to use it in some other places too. not only in this method. because is out of scope, the app crashes. But, I repeat, it is the one who gives its value to url.