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

  • disneychannel

    disneychanne

    19 ŞUBAT 2006
  • inovationgmbh

    inovationgmb

    28 EYLÜL 2010
  • MovieZoneET

    MovieZoneET

    22 Aralık 2009