1
NSString *urlVal = @"http://at.azinova.info/green4care/iphone/viewImage.php?id=";
NSString *urlVal1 = [urlVal stringByAppendingString:selectedCountryw];
NSURL *url1 = [NSURL URLWithString:urlVal1];
NSString *resultString = [NSString stringWithContentsOfURL:url1 encoding:NSUTF8StringEncoding error:nil];
NSMutableArray *arycountries2 = [resultString componentsSeparatedByString:@"#***#"];
arraycountries = [[NSMutableArray alloc]initWithArray:arycountries2];
我想显示图像url(resultstring)到tableview。我提到three20和lazytable,但它不适合我。下面iPhone多重图像加载
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [arraycountries count];
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.imageView.image = [UIImage imageNamed:[arraycountries objectAtIndex:indexPath.row]];
return cell;
}
实现代码如下代码给请帮我
thankz krishnabhadra..now我知道如何接受答案 – 2011-04-27 10:09:59
是你想在单元格中显示图像? – 2011-04-27 10:58:58
请不要再创建新账户再次提出同样的问题。这被认为是滥用系统,可以保证中止。 – Will 2011-04-27 17:42:17