swift - XCode6 NSSplitViewController Holding Priorities and canCollapse not working -



swift - XCode6 NSSplitViewController Holding Priorities and canCollapse not working -

i hoping can help me out this.

whatever do, either though ib or in code, cannot create new nssplitviewcontroller , items collapsable or hold priorities.

it cannot done interface builder although video shows otherwise: https://www.youtube.com/watch?v=ziiupo4f6tq

i can create splitview items have minimum width in code pretty much it. tested both swift , objective-c implementations without luck.

this have written in swift:

override func viewdidload() { super.viewdidload() // --- var left: nssplitviewitem = self.splitviewitems[0] nssplitviewitem var right: nssplitviewitem = self.splitviewitems[1] nssplitviewitem // --- // note: these not working in interface builder self.view.addconstraint(nslayoutconstraint( item: left.viewcontroller.view, attribute: nslayoutattribute.width, relatedby: nslayoutrelation.greaterthanorequal, toitem: nil, attribute: nslayoutattribute.notanattribute, multiplier: 0, constant: 200 )) self.view.addconstraint(nslayoutconstraint( item: right.viewcontroller.view, attribute: nslayoutattribute.width, relatedby: nslayoutrelation.greaterthanorequal, toitem: nil, attribute: nslayoutattribute.notanattribute, multiplier: 0, constant: 200 )) // --- // note: these not working in interface builder neither here set anyway demonstrate problem left.cancollapse = true // has no effect right.cancollapse = true // has no effect // --- // note: not working in interface builder neither here set anyway demonstrate problem right.holdingpriority = 1.0 // has no effect }

none of works @ all. tried moving phone call super @ bottom of function without much luck.

i wondering if has identified solution or perhaps doing wrong?

make nssplitviewcontroller delegate of nssplitview: e.g. in ib connect delegate outlet of nssplitview controller. (seems not connected automatically in ib-template 1 expect...) instead of coding utilize ib alter holding priority of nssplitviewitem (so instance 1 249 , other 250). here can check "can collapse" etc. i used ib set min size constraints of subviews.

(one issue: after collapsing, couldn't collapsed view mouse; might require implementing effective rect delegate methods. update: effective rect doesn't apply when collapsed, think using nssplitviewitem.collapsed in code seems way un-collapse. behavior different 'classic' nssplitview...)

this basic setup worked expected without specific coding or overriding. (os x storyboard app, swift, xcode 6.1)

swift xcode6 autolayout nssplitview

Comments

  1. Swift - Xcode6 Nssplitviewcontroller Holding Priorities And Cancollapse
    Not Working - >>>>> Download Now

    >>>>> Download Full

    Swift - Xcode6 Nssplitviewcontroller Holding Priorities And Cancollapse
    Not Working - >>>>> Download LINK

    >>>>> Download Now

    Swift - Xcode6 Nssplitviewcontroller Holding Priorities And Cancollapse
    Not Working - >>>>> Download Full

    >>>>> Download LINK Ow

    ReplyDelete

Post a Comment

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -