SwiftyImage icon indicating copy to clipboard operation
SwiftyImage copied to clipboard

Fix crash

Open LinXunFeng opened this issue 2 years ago • 1 comments

Fix crash

It will crash when width or height equal zero

let bgImg = UIImage.size(width: 1, height: 0).color(.red).image
let bgImg = UIImage.size(width: 0, height: 1).color(.red).image

LinXunFeng avatar Nov 01 '21 03:11 LinXunFeng

Fix sencond bug

I use two color (fe7338 and fc8e2b), their hashValue are same

so, these codes will be bug

hasher.combine(self.colors)
hasher.combine(self.borderColors)

image

Resolve: I transform UIColor to HexString before compare hashValue

LinXunFeng avatar Feb 17 '22 02:02 LinXunFeng