1
Fork 0

Actually update loading label

For some reason, I never actually hooked up the field to actually disappear when
loading successfully.
This commit is contained in:
Joshua Goins 2022-06-15 11:01:20 -04:00
parent cea81a2221
commit eeba7bba02
2 changed files with 3 additions and 3 deletions

View file

@ -407,6 +407,7 @@ Dk51bWJlciBvZiBMYXllcnM
</view>
<connections>
<outlet property="imageView" destination="y0M-Hn-T88" id="Wch-Vz-0ui"/>
<outlet property="loadingField" destination="O48-im-AhA" id="d70-A7-6QU"/>
<segue destination="wda-Mt-beD" kind="sheet" identifier="showInfo" id="obo-Yt-yny"/>
</connections>
</viewController>

View file

@ -7,7 +7,6 @@ class ViewController: NSViewController {
@IBOutlet weak var loadingField: NSTextField!
override func viewDidLoad() {
imageView.setContentCompressionResistancePriority(
.defaultLow,
for: .horizontal)
@ -23,12 +22,12 @@ class ViewController: NSViewController {
DispatchQueue.main.async {
guard let image = document?.makeComposite() else {
//self.loadingField.stringValue = "Failed to load."
self.loadingField.stringValue = "Failed to load."
return
}
self.imageView.image = image
//self.loadingField.isHidden = true
self.loadingField.isHidden = true
}
}