zoukankan      html  css  js  c++  java
  • 2016-03-11 tableview cell 可以将横线铺满width

    代理:

    - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath

     

    {

        

        //将分割线拉伸到屏幕的宽度

        

        if ([cell respondsToSelector:@selector(setSeparatorInset:)])

            

        {

            

            [cell setSeparatorInset:UIEdgeInsetsZero];

            

        }

        

        if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {

            

            [cell setLayoutMargins:UIEdgeInsetsZero];

            

        }

        

    }

    2:viewdidload中

       

        if ([self.MedicatableView respondsToSelector:@selector(setSeparatorInset:)]) {

            

            [self.MedicatableView setSeparatorInset:UIEdgeInsetsZero];

            

        }

        

        if ([self.MedicatableView respondsToSelector:@selector(setLayoutMargins:)]) {

            

            [self.MedicatableView setLayoutMargins:UIEdgeInsetsZero];

            

        }

        

        if([[[UIDevice currentDevice]systemVersion]floatValue]>=7.0)

            

        {

            

            self.edgesForExtendedLayout = UIRectEdgeNone;

            

            self.automaticallyAdjustsScrollViewInsets = NO;

            

        }

     

     

     

     

  • 相关阅读:
    深入理解java异常处理机制
    i2c总线
    运行时类型识别(RTTI)
    bcg界面库总结
    c++ 虚函数表
    宽字符,宽字符串
    c++异常处理
    内存管理
    c++中使用联合体
    MFC自定义消息
  • 原文地址:https://www.cnblogs.com/gzz2016/p/5266509.html
Copyright © 2011-2022 走看看