ICode9

精准搜索请尝试: 精确搜索
  • 【iOS】UITableViewCell实现分区圆角2021-06-30 16:32:06

    可以在tableView的willDisplayCell回调中实现,常用的实现方式有两种 根据cell在section中的位置,利用UIBezierPath绘制蒙层,从而实现分区圆角 cell可分为4种: 1. 当前section有且仅有1行,此时该行cell既是第一行的cell,也是最后一行的cell,四个角都要绘制圆角 2. 每个section中第一行

  • swift:设置部分圆角2020-06-25 14:40:49

    可以将下面的configRectCorner方法写成公共方法,方便调用 let label = UILabel(frame: CGRect(x: 50, y: 100, width: 100, height: 50)) label.backgroundColor = UIColor.orange label.textColor = UIColor.white label.text = "圆角设置" label.textAlignment = .center

  • 绘制特殊图形2019-09-24 09:01:03

    //设置视图位置和大小 UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(15, 300, self.view.bounds.size.width-30, 46)]; //设置背景颜色 myView.backgroundColor = [UIColor blackColor]; //绘制圆角 要设置的圆角 使用“|”来组合 UIBezierPath

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有