SORU
20 Aralık 2012, PERŞEMBE


UİCollectionView aralığı boşluklarını

Fotoğrafları gösteren UICollectionView var. Bu collectionview UICollectionViewFlowLayout kullanarak oluşturduk. İyi çalışıyor ama kenarlarında boşluk var istiyorum. Kullanarak bunu yapmak mümkün UICollectionViewFlowLayout ya da ben kendim UICollectionViewLayout uygulamak mı gerekir?

CEVAP
15 Ocak 2013, Salı


UICollectionView UICollectionViewFlowLayout nesne sectionInset özelliği takılı UICollectionView için: collectionView:layout:insetForSectionAtIndex: yöntemi kullanabilirsiniz

- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{
    return UIEdgeInsetsMake(top, left, bottom, right);
}

ya

UICollectionViewFlowLayout *aFlowLayout = [[UICollectionViewFlowLayout alloc] init];
[aFlowLayout setSectionInset:UIEdgeInsetsMake(top, left, bottom, right)];

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • CasinoRoyaleMovie's channel

    CasinoRoyale

    1 AĞUSTOS 2006
  • kylelandry

    kylelandry

    9 AĞUSTOS 2007
  • The Bad Tutorials

    The Bad Tuto

    6 EKİM 2009