2016-05-05 9 views

Odpowiedz

1

Utwórz widok klasę i dodać oznaczenie aktywności w tym widoku

Zarejestruj tej klasy jako widok stopka klasy przy użyciu:

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

Albo ustawić headerReferenceSize na zbiórki układu widoku lub wdrożyć

collectionView:layout:referenceSizeForHeaderInSection: in your delegate. 

Powróć widok stopki z poniższej metody w swoim źródle danych:

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 
} 
Powiązane problemy