2016-05-05 26 views

cevap

1

görünümü sınıf oluşturun ve o görünüme

aktivite göstergesini eklemek Kayıt altbilgi görünümü sınıf olarak bu sınıfı kullanarak:

registerClass(myFooterViewClass, forSupplementaryViewOfKind: UICollectionElementKindSectionFooter, withReuseIdentifier: "myFooterView") 

Ya toplama görünüm düzeni üzerinde headerReferenceSize ayarlamak veya uygulamak

collectionView:layout:referenceSizeForHeaderInSection: in your delegate. 

Altbilgi görünümünü veri kaynağınızda aşağıdaki yöntemden döndürün:

func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView { 
let view = collectionView.dequeueReusableSupplementaryViewOfKind(UICollectionElementKindSectionFooter, withReuseIdentifier: "myFooterView", forIndexPath: indexPath) 
// configure footer view 
return view 
}