cell线到头

iOS8 SDK兼容性调整:消除cell下划线与布局问题

    //cell线到头

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

        [self.tableViewsetSeparatorInset:UIEdgeInsetsMake(0,0,0,0)];

    }    //ios8SDK 兼容6 7 cell下划线

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

        [self.tableView setLayoutMargins:UIEdgeInsetsZero];

    }


//ios8SDK 兼容6 7

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

        [cell setLayoutMargins:UIEdgeInsetsZero];

    }


要在POI中设置单元格的边框线,可以使用CellStyle类的setBorderXxx()方法来实现,其中Xxx代表要设置的边框线类型。以下是一些常用的边框线类型及其对应的方法: 1. 设置左边框线: ```java CellStyle style = workbook.createCellStyle(); style.setBorderLeft(BorderStyle.THIN); ``` 2. 设置右边框线: ```java CellStyle style = workbook.createCellStyle(); style.setBorderRight(BorderStyle.THIN); ``` 3. 设置上边框线: ```java CellStyle style = workbook.createCellStyle(); style.setBorderTop(BorderStyle.THIN); ``` 4. 设置下边框线: ```java CellStyle style = workbook.createCellStyle(); style.setBorderBottom(BorderStyle.THIN); ``` 5. 设置所有边框线: ```java CellStyle style = workbook.createCellStyle(); style.setBorderLeft(BorderStyle.THIN); style.setBorderRight(BorderStyle.THIN); style.setBorderTop(BorderStyle.THIN); style.setBorderBottom(BorderStyle.THIN); ``` 请注意,上述代码中的`workbook`代表你创建的Workbook对象,可以根据你的实际情况进行相应调整。同时,上述代码只设置了细线边框,如果需要设置其他类型的边框线,可以使用`BorderStyle`枚举类中提供的不同常量。 最后,还需要将CellStyle应用到对应的单元格上,可以使用Cell类的setCellStyle()方法来实现。例如: ```java Cell cell = row.createCell(0); cell.setCellValue("Hello, World!"); cell.setCellStyle(style); ``` 这样就可以将单元格样式应用到指定的单元格上了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值