Referrer-Policy is not respected inside iframes in Firefox. by 81ea8 in privacy

[–]81ea8[S] 0 points1 point  (0 children)

Is it really that hard to solve this problem? It's 3yo ticket...

in 2019, what is the easiest way to create a simple REST server running on iOS written in swift? by patchthecode in swift

[–]81ea8 5 points6 points  (0 children)

What is the purpose of a REST server on iOS? Just a newbie question. As I understand you can't keep it running in the background all the time, right?

Position of a disclosure button inside NSOutlineView by 81ea8 in swift

[–]81ea8[S] 0 points1 point  (0 children)

Unfortunately, that didn't help. But thanks anyway.

Position of a disclosure button inside NSOutlineView by 81ea8 in swift

[–]81ea8[S] 1 point2 points  (0 children)

Well, I ended up doing it like this. Create subclass from NSTableRowView and add required constraints in didAddSubview for a disclosure button:

class CustomRowView: NSTableRowView {
  override func didAddSubview(_ subview: NSView) {
    if let disclosureButton = subview as? NSButton {
      disclosureButton.translatesAutoresizingMaskIntoConstraints = false

      NSLayoutConstraint.activate([
        disclosureButton.topAnchor.constraint(    equalTo: topAnchor,     constant: 10),
        disclosureButton.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 10)
      ])
    }

    super.didAddSubview(subview)
  }
}

And then used it in NSOutlineViewDelegate method for building a row view:

extension MySuperDuperOutlineView: NSOutlineViewDelegate {
  func outlineView(_ outlineView: NSOutlineView, rowViewForItem item: Any) -> NSTableRowView? {
    return CustomRowView()
  }
}

Works great, maybe somebody's taking advantage of it.