lukescott / DraggableCollectionView

Extension for the UICollectionView and UICollectionViewLayout that allows a user to move items with drag and drop. --- HELP WANTED --- Looking for maintainer and help with the experimental branch.
MIT License
549 stars 175 forks source link

Xcode gives me errors, parse issue, "expected a type", "unknown type name 'UICollectionView Layout'"... #45

Closed zttt closed 8 years ago

zttt commented 10 years ago

Project was created using Xcode 6, Deployment Target 8.0. 1

I tried create a new project using xcode 4.6.3, I worked fine. But when I imported those files to my xcode 6 project, it gives me errors. Does anybody know why?

drost commented 10 years ago

I had the same problem. What I found was that an import of UIKit.h was missing from LSCollectionViewLayoutHelper.h. So just add #import <UIKit/UIKit.h> to the top of that file and your good to go. The reason it works with the included example project is because it uses a prefix header containing that include. Was a bit tricky to find because of all the "random" errors.

03128crz commented 9 years ago

cause xcode6 don't create pch file ,so you need to import <UIKit/UIkit.h>