I used NSCollectionView
in my application. In certain condition i want to hide and Unhide the NSCollectionView
. But it will not hide the NSCollectionView
.
I used the following code
@IBOutlet weak var thumbnailView: NSCollectionView!
func applicationDidFinishLaunching(aNotification: NSNotification) {
thumbnailView.hidden = true
NSThread.sleepForTimeInterval(5)
thumbnailView.hidden = false
}
Note: Sleep the thread just for demonstration purpose
Also Hiding the NSScrollView
is not working.
EDIT: I perform same code on Button Touch up Inside event
i get the same result. It does not hide my CollectionView
.
@IBAction func ButtonnISClick(sender: AnyObject) {
thumbnailView.hidden = true
NSThread.sleepForTimeInterval(5)
thumbnailView.hidden = false
}