Skip to content

Commit

Permalink
♻️ サイズ0でscaleを設定すると警告が表示されるので元に戻す
Browse files Browse the repository at this point in the history
  • Loading branch information
tasuwo committed May 8, 2021
1 parent 5cd649d commit 545da7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TBoxUIKit/View/ClipPreview/ClipPreviewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public class ClipPreviewView: UIView {
guard let source = source else { return }
imageView.image = source.uiImage

// HACK: 参照タイミングによってはbounds.sizeがゼロになるので、強制的に描画する
layoutIfNeeded()

updateZoomScaleLimits()
resetToInitialZoomScale()
updateInitialZoomScaleFlag()
Expand Down

0 comments on commit 545da7a

Please sign in to comment.