在UIbutton中有是三个EdgeInsets的设置:ContentEdgeInsets、titleEdgeInsets、imageEdgeInsets

UIEdgeInsetsMake
里面的四个参数表示距离上边界、左边界、下边界、右边界的距离,默认都为零,title/image在button的正中央
    left.titleEdgeInsets = UIEdgeInsetsMake(3, -25, 0, 0);
    left.imageEdgeInsets = UIEdgeInsetsMake(0, -30, 0, 0);

具体左边根据需求自己调

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案