Saat mengubah ukuran ikon dengan
UIEdgeInsetsMake(top, left, bottom, right)
, perlu diingat dimensi tombol dan kemampuan UIEdgeInsetsMake untuk bekerja dengan nilai negatif seolah-olah mereka positif.
Contoh: Dua tombol dengan tinggi 100 dan aspek 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)
Contoh 1 dan 3 identik sejak ABS (100 - (40 + 40)) = ABS (100 - (60 + 60))