(xCodeとプログラミングの初心者)ftpサーバーからUIImageViewに画像を接続/ダウンロード/変数に保存して表示しようとしています。コードは以下のとおりです。ヘルプアドバイスをいただければ幸いです。
- (void)viewDidLoad
{
//sets label to notify user whats happening
NSMutableString *labelString;
labelString = [NSMutableString stringWithString: @"Connecting"];
[labelDymamic setText: labelString];
//variable for ftp location
NSString *ftpLocation = [NSString stringWithFormat:@"ftp2.bom.gov.au/anon/sample/gms/IDE00003.201011170430.gif"];
//variable to recieve data
NSMutableData *responseData;
//loads ftpLocation into url
NSURL *url = [NSURL URLWithString:ftpLocation];
//sets label to notify user whats happening
NSMutableString *labelStringDownloading;
labelStringDownloading = [NSMutableString stringWithString: @"Downloading"];
[labelDymamic setText: labelStringDownloading];
//Connect to ftp
self.ftpImageView.image = [UIImage imageNamed:@"Icon.png"];
self.labelDymamic.text = @"Receiving";
NSURLRequest *request = [NSURLRequest requestWithURL:url];
(void) [[NSURLConnection alloc] initWithRequest: request delegate:self];
//download image
//save to variable
//display to screen
//sets label to notify application loading complete
NSMutableString *labelLoadedString;
labelLoadedString = [NSMutableString stringWithString: @"Radar"];
[labelDymamic setText: labelLoadedString];
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
現時点で表示されているのは、labelLoadedString 変数「Radar」を持つ白い画面だけです。
ありがとうアラン