objective c - iOS - Custom table cell not full width of UITableView -


i may going wrong. have created uitableview has auto-layout trailing space set main view. creating custom cell table drug on prototype cell, customized it, , created class it. working fine.

what can't seem solve custom cell isn't going full width of actual table cell white background shows up. if don't use custom cell entire width table cell gets utilized.

i set constraints cell content background image should fill cell.

what doing wrong? let me know need solve this.

profilecustomcell.h

#import <uikit/uikit.h>  @interface profilecustomcell : uitableviewcell {  }  @property (nonatomic, strong) iboutlet uilabel *namelabel; @property (nonatomic, strong) iboutlet uiimageview *profileimageview;  @end 

profilecustomcell.m

#import "profilecustomcell.h"  @implementation profilecustomcell  - (id)initwithstyle:(uitableviewcellstyle)style reuseidentifier:(nsstring *)reuseidentifier {      self = [super initwithstyle:style reuseidentifier:reuseidentifier];      if (self) {         self.namelabel.text = nil;     }      return self;  }  - (void)setselected:(bool)selected animated:(bool)animated {     [super setselected:selected animated:animated]; }  @end 

uitableview

[tableview registernib:[uinib nibwithnibname:@"profilecustomcell" bundle:[nsbundle mainbundle]] forcellreuseidentifier:@"cell"];  [tableview setseparatorstyle:uitableviewcellseparatorstylenone];  profilecustomcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier];  cell.namelabel.text = [nsstring stringwithformat:@"%@", [child objectforkey:@"first_name"]]; [cell setselectionstyle:uitableviewcellselectionstylenone]; 

enter image description here

can post code please .

did enable use auto layout , use size classes below first in both table view , table view cell .and tell me problem

enter image description here

1)after select both image , label , below

enter image description here

2) select image , below

enter image description here

3) select label following

enter image description here

can check link below:

table cell content(title) moving left after selecting cell


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -