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

  • BlackmillMusic

    BlackmillMus

    3 Kasım 2010
  • DigitalRev TV

    DigitalRev T

    30 AĞUSTOS 2007
  • Simon Hayter

    Simon Hayter

    20 HAZİRAN 2010