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:
parent
cea81a2221
commit
eeba7bba02
2 changed files with 3 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue