【iOS】メモ Swift4 transform 最大値 、最小値
let max = 10.0 let min = 0.5 let scale = sqrt ( abs ( self . transform . a * self . transform . d - self . transform . b * self . transform . c )) if (scale > max ){ self . transform = self . transform . scaledBy (x: max / scale, y: max / scale) } else if (scale < min ){ self . transform = self . transform . scaledBy (x: min / scale, y: min / scale) }