pilot study cell segmentation line display issue

来源:互联网 发布:网络电视直播哪个好 编辑:程序博客网 时间:2024/05/29 15:22
   At iOS system6  before .if u control cell view display ,you can use api function or action. 

     code:cell.selectionStyle = UITableViewCellSelectionStyleNone;

 but on the iOS system6 after. this function  not work.

 so user down function is able to effect!

          code: Uiveiw*footView =  [[Uivew alloc]initWithFrame:CGRectZero];

                    self.tableview.footView = footView; 

  or genaeral Written first you have a manage class 


   - (void)setExtraCellLineHidden: (UITableView *)tableView{
    if(!self.splitView){
        self.splitView =[ [UIView alloc]init];
        self.splitView .backgroundColor = [UIColor clearColor];
        [tableView setTableFooterView:self.splitView ];
        self.splitView =[ [UIView alloc]init];
        self.splitView .backgroundColor = [UIColor clearColor];
        [tableView setTableHeaderView:self.splitView ];
    }

}//在tableview footview and headerview 分别设置了一个空的view 而非nil 更非section的headview


- (void)setCellLineExtend:(UITableView *)tableView{
    if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
        [tableView setSeparatorInset:UIEdgeInsetsZero];
    }

}//如果表示图可以相应setSeparatorInset Funcation 就把它的分割线控制为zero

call written usually writtrn 

- (void)viewDidLoad

{

    [superviewDidLoad];

    // Do any additional setup after loading the view from its nib.

    [selfinitUI];

}

  • -(void)initUI{
        [self setCellLineExtend:self.mainTable];
        [self setExtraCellLineHidden:self.mainTable];
    }



0 0