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

  • alex maybury

    alex maybury

    20 Aralık 2007
  • Charles Griffin Gibson

    Charles Grif

    26 NİSAN 2006
  • kndx

    kndx

    11 Mart 2006