Hallo alle zusammen,
habe mal eine Verständnisfrage.
Wieso erstellt man eigentlich eine Tabelle so:
Man könnte doch auch:
Und dann alles in der Celle selber machen lassen. Wäre vielleicht ja so gar ordentlicher. Hatte mit einem Freund eine Diskussion darüber und sind nicht wirklich zu einem Ergebnis gekommen. In allen Bücher oder im Web habe ich immer nur Variante A gefunden.
Was sagt Ihr den so dazu?
Viele Grüße
Constantin
habe mal eine Verständnisfrage.
Wieso erstellt man eigentlich eine Tabelle so:
PHP-Quellcode
- -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
- static NSString *cellIdentifier;
- TilesCollectionViewCell *tilesCollectionViewCell;
- cellIdentifier = @"TilesCollectionViewCell";
- tilesCollectionViewCell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath];
- tilesCollectionViewCell.lblCreater.text = tiles.creater;
- tilesCollectionViewCell.lblTitle.text = tiles.title;
- tilesCollectionViewCell.lblSubTitle.text = tiles.subTitle;
- return tilesCollectionViewCell;}
Man könnte doch auch:
PHP-Quellcode
- -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ static NSString *cellIdentifier; TilesCollectionViewCell *tilesCollectionViewCell;cellIdentifier = @"TilesCollectionViewCell"; tilesCollectionViewCell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath]; tilesCollectionViewCell.tiles = tiles;
- return tilesCollectionViewCell;}
Und dann alles in der Celle selber machen lassen. Wäre vielleicht ja so gar ordentlicher. Hatte mit einem Freund eine Diskussion darüber und sind nicht wirklich zu einem Ergebnis gekommen. In allen Bücher oder im Web habe ich immer nur Variante A gefunden.
Was sagt Ihr den so dazu?
Viele Grüße
Constantin