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> </view>
<connections> <connections>
<outlet property="imageView" destination="y0M-Hn-T88" id="Wch-Vz-0ui"/> <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"/> <segue destination="wda-Mt-beD" kind="sheet" identifier="showInfo" id="obo-Yt-yny"/>
</connections> </connections>
</viewController> </viewController>

View file

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