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

  • adrianisen

    adrianisen

    25 Kasım 2009
  • gamingbits

    gamingbits

    2 Mayıs 2006
  • waterfairy17

    waterfairy17

    9 Aralık 2007