Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableViewCell: image appears behind the Cell View
    primarykey
    data
    text
    <p>its really annoying but for some reason my ImageView appears right behind the Cell View. If I turn clipping off then I can see the Image just right behind the cell. FYI, I am trying to display the image which was picked from the photo library and converted to PNG.</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *headerCellID = @"FormHeaderCellView"; if(indexPath.section==0 &amp;&amp; indexPath.row==0) //Header cell { FormHeaderCellView *cell = (FormHeaderCellView *)[self.tableView dequeueReusableCellWithIdentifier:headerCellID]; if (cell == nil) { NSArray *topLevelObjects =[[NSBundle mainBundle] loadNibNamed:headerCellID owner:nil options:nil]; for (id currentObject in topLevelObjects) { if( [currentObject isKindOfClass:[UITableViewCell class]]) { cell = (FormHeaderCellView *) currentObject; break; } } } NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *file = [documentsDirectory stringByAppendingPathComponent:@"logo.png"]; if([[NSFileManager defaultManager] fileExistsAtPath:file]) { UIImage *img=[[UIImage alloc] initWithContentsOfFile:file]; [cell.logoImage setImage:img]; } [cell.textLabel setText:[[NSUserDefaults standardUserDefaults] objectForKey:@"userName"]]; [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; return cell; } </code></pre> <p>Everything seems to be loading just fine since I can visually see the image behind the cell. Would appreciate your help.</p> <p><strong>Update:</strong> Did some tests and the image appears just fine if in the Nib I set logoImage's image property to any image in the bundle. So the problem is with displaying the image which is loaded from the documents directory (which was saved from photo library).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload