Skip to content

Instantly share code, notes, and snippets.

@iby
Created March 11, 2023 13:23
Show Gist options
  • Save iby/3380e51bfc40a07e25224ce2bf4f5e27 to your computer and use it in GitHub Desktop.
Save iby/3380e51bfc40a07e25224ce2bf4f5e27 to your computer and use it in GitHub Desktop.

Revisions

  1. iby created this gist Mar 11, 2023.
    9 changes: 9 additions & 0 deletions .swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    // This is a hideous hack for 10.11 where constraints are applied for detached view and the entire
    // toolset panel looks like a huge cock…

    if #available(macOS 10.13, *) {
    } else if self.instructionView.isHidden && self.instructionView.superview != nil {
    self.stackView.removeView(self.instructionView)
    } else if !self.instructionView.isHidden && self.instructionView.superview == nil {
    self.stackView.insertView(self.instructionView, at: 0, in: .center)
    }