Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (CustomeCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
- CustomeCell * cell = [tableView dequeueReusableCellWithIdentifier:@"rssItemCell"];
- if(nil == cell){
- cell = [[[CustomeCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"rssItemCell"]autorelease];
- }
- cell.lblStoreName.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]title];
- cell.lblStoreDetail.text = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]description];
- NSLog(@"%@",[[self rssParser]rssItems]);
- //cell.imgStore.image = [[[[self rssParser]rssItems]objectAtIndex:indexPath.row]mediaUrl];
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
- NSString * mediaUrl = [[[self appDelegate]currentlySelectedBlogItem]mediaUrl];
- if(nil != mediaUrl){
- NSData* imageData;
- [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
- @try {
- imageData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:mediaUrl]];
- }
- @catch (NSException * e) {
- //Some error while downloading data
- }
- @finally {
- UIImage * imageFromImageData = [[UIImage alloc] initWithData:imageData];
- //[[self image]setImage:imageFromImageData];
- cell.imgStore.image = imageFromImageData;
- [imageData release];
- [imageFromImageData release];
- }
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- }
- return cell;
- }
Add Comment
Please, Sign In to add comment