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;

            

        }

     

     

     

     

  • 相关阅读:
    JS判断是否是IE浏览器
    JS在页面光标位置插入新内容
    JS限制文本框输入金额,保留2位小数
    JS格式化日期方法
    MySQL数据库中16进制进行位运算
    Java过滤特殊字符的正则表达式
    JAVA查看线程信息
    win7 安装Redis
    JAVA获取catch中的异常信息
    cpu占用率过高debug
  • 原文地址:https://www.cnblogs.com/gzz2016/p/5266509.html
Copyright © 2011-2022 走看看