Hi Cluade,I'm looking for NSCollectionView & not for UICollectionView
Post
Replies
Boosts
Views
Activity
I tried both the ways, but it didn't workoption 1:func collectionView(_ collectionView: NSCollectionView, layout collectionViewLayout: NSCollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> NSSize {
if let selectedRow = selectedRow {
if selectedRow == indexPath.item {
CATransaction.begin()
let animation = CABasicAnimation(keyPath: "transform.scale.y")
animation.duration = 3.0
animation.fromValue = 71
animation.toValue = 571
collectionView.item(at: indexPath)?.view.layer?.add(animation, forKey: "transform.scale.y")
CATransaction.commit()
return NSSize(width: collectionView.bounds.width, height: 571)
}
}
return NSSize(width: collectionView.bounds.width, height: 71)
}option 2:func collectionView(_ collectionView: NSCollectionView, didSelectItemsAt indexPaths: Set<IndexPath>) {
if let indexPath = indexPaths.first {
if self.selectedRow == indexPath.item {
self.selectedRow = nil
} else {
self.selectedRow = indexPath.item
}
if let cell = collectionView.item(at: selectedRow!) {
CATransaction.begin()
let animation = CABasicAnimation(keyPath: "transform.scale.y")
animation.duration = 2.0
animation.fromValue = 71
animation.toValue = 571
cell.view.layer?.add(animation, forKey: "transform.scale.y")
CATransaction.commit()
}
}
}
Animation didn't work.Tried removing:CATransaction.begin()andCATransaction.commit()still didn't work
Yes
Well, it's throwing an error in applicationDidFinishLaunching, on line splashWindow.makeKeyAndOrderFront(splashWindow)
Sorry Cluade,Forgot to add error desciption.I receive following error:Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional valueon line splashWindow.makeKeyAndOrderFront(splashWindow)
OK, I figured out why it's not wokring.I'm not using MainMenu.xib, instead I'm using Main.storyboardWhat I want is Show first Splash Window and then Main WindowPlse find demo source at htt ps://github.com/bchandresh/NSWindowDemoAlso note my email address bchandresh@icloud.com
Tried this - allowed multiple selection=> On tapping already selected cell doesn't deselect it.
I have the same problem. Couldn't solve by any solution. Did you solve the issue?
I had the similar issue. I have figured out that my app identifier has 2 iCloud containers attached with.
I removed the iCloud container which was not in use.
Steps to edit iCloud container.
Go to your developer account
Certificates, IDs & Profiles
Identifiers
Select your app's identifier
iCloud > Edit Container
Choose the correct iCloud container
This did solve my problem. Hope it works for you too.
At last my problem got resolved.
I have figured out that my app identifier has 2 iCloud containers attached with.
I removed the iCloud container which was not in use.
Steps to edit iCloud container.
Go to your developer account
Certificates, IDs & Profiles
Identifiers
Select your app's identifier
iCloud > Edit Container
Choose the correct iCloud container
This did solve my problem. Hope it works for you too.
The problem was from apple side. They believe that the problem is now solved.
Thank Apple team. My problem gets resolved. I don't see these type of errors now.