Strange behavior using view-based NSOutline (Sourcelist)

后端 未结 4 1754
终归单人心
终归单人心 2021-01-30 11:39

I have a (new in Lion) view-based NSOutlineView as Sidebar SourceList in my app using CoreData + NSTreeController + Bindings + NSOutlineView and an Object as NSOutlineViewDelega

4条回答
  •  野的像风
    2021-01-30 12:10

    In case it's not obvious to anyone:

    "Floats group rows" in Interface Builder:

    You can set "Floats group rows" directly in Interface Builder.

    1. select your Source List in Interface Builder's document outline.

    2. show the Attributes Inspector, and you will find the "Floats Group Rows" checkbox. Untick it, and your nasty jumping group headings suddenly behave themselves :)

    In Swift:

    Alternatively, if you're in Swift, you can do something like:

    @IBOutlet weak var sourceList: NSOutlineView!    
    sourceList.floatsGroupRows = false
    

提交回复
热议问题