NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

Hacking with MacOs project7 Drag and drop

Forums > macOS

Hi , In Hacking with MacOs in the drag and drop part ( page 392 ) I do not understand why the CollectionView needs to be updated in this way: // 6. update the array and collection view photos.insert(destinationURL, at: indexPath.item) ctaollectionView.insertItems(at: [indexPath])

And not simply by doing collectionView.reloadData() I would have thought that is was for performance reasons, but it just does not work and I cannot figure out why. Regards Etienne

1      

Hacking with macOS is a complete coding series that teaches macOS ... You learn Swift whilst you're making actual macOS initiatives with AppKit and SwiftUI, so that you can apply ... Meet NSCollectionView for the primary time, then upload drag and drop picture

1      

Hacking with Swift is sponsored by MadMachine

SPONSORED Want to explore your Swift skill outside of the Apple world? Join the MadMachine community and start to program microcontrollers in Swift.

Get it now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.