Al cambiar el tamaño del icono con
UIEdgeInsetsMake(top, left, bottom, right)
, tenga en cuenta las dimensiones de los botones y la capacidad de UIEdgeInsetsMake para trabajar con valores negativos como si fueran positivos.
Ejemplo: dos botones con altura 100 y aspecto 1: 1.
left.imageEdgeInsets = UIEdgeInsetsMake(40, 0, 40, 0)
right.imageEdgeInsets = UIEdgeInsetsMake(40, 0, 40, 0)

left.imageEdgeInsets = UIEdgeInsetsMake(40, 0, 40, 0)
right.imageEdgeInsets = UIEdgeInsetsMake(45, 0, 45, 0)

left.imageEdgeInsets = UIEdgeInsetsMake(40, 0, 40, 0)
right.imageEdgeInsets = UIEdgeInsetsMake(60, 0, 60, 0)

Los ejemplos 1 y 3 son idénticos ya que ABS (100 - (40 + 40)) = ABS (100 - (60 + 60))