mia collezione struttura vista di cella è descritta come di seguitoapplica l'ombra per la vista rende il mio testo sfocato
Per cellItemAtIndex
, faccio la seguente
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:@"reusedCell" forIndexPath:indexPath];
// Set shadow around the cell
[cell.layer setMasksToBounds :NO ];
[cell.layer setShadowColor :[[UIColor whiteColor ] CGColor ] ];// shadow's color
[cell.layer setShadowOpacity :0.65 ]; // set the opacty
[cell.layer setShadowRadius :5.0 ]; // set the blur radius
[cell.layer setShadowOffset :CGSizeMake(0 , 0) ]; // set shadow position
[cell.layer setShouldRasterize :YES ]; // tell the cell to render it’s CALayer as a bitmap
[cell.layer setShadowPath :[[UIBezierPath bezierPathWithRect:cell.bounds ] CGPath ] ]; // use a path to draw its shadow instead of using its
......................................................................
}
Quando eseguo il applicazione sul dispositivo, viene mostrata l'ombra. Tuttavia, il mio testo per le etichette è sfocato. Si prega di dare un'occhiata a seguito ripreso preso dal mio dispositivo
Se io rimuovere il commento il blocco Bode che viene utilizzato per eliminare l'ombra, il testo è così chiara come nell'immagine seguente
I sono ... completamente perso. Qualcuno ha qualche idea su questo problema. Please help
qualcuno ha avuto un'idea di questo ??? – tranvutuan
mi hai salvato amico. tnxx alot – posha