Search code examples
iosobjective-cuicollectionviewpstcollectionview

Change class of UICollectionView to PSTCollectionView in xib


My application is supporting iOS 5.1+. And I want to use UICollectionView in my application.

But UICollectionView is not available prior iOS 6.0 versions. So I used famous third party library PSTCollectionView. It has solve my all class related errors.

Now problem is in my XIB I have used UICollectionView control. When I build application I get following error for XIB only:

error: Class Unavailable: `UICollectionView` on iOS versions prior to 6.0

I tried to change the parent class of UICollectionView to PSTCollectionView but it is not showing there any such class in listing.

How can I solve this XIB related problem.


Solution

  • To get rid of this problem I removed xib from my project. And converted my UIViewController class to subclass of UIView. And added that class as a subview wherever it was required.