1
voto
¿Cómo saber el ancho de una collectionView en iOS, Xcode?
la respuesta es:
let availableWidth = collectionView.bounds.inset(by: collectionView.layoutMargins).width
Impaciente...
1
voto
Enviar parámetros usando Segue
Espero esto te ayude.
Primero programaticamente cuando selecciones una celda pasa por el parametro sender lo que te sea mas conveniente:
func collectionView(_ collectionView: UICollectionView, ...
1
voto
Aceptado
agregar un item o celda teniendo un array, en un collectionView
Tienes un par de cosas que deberías cambiar.
Tu modelo de datos, lo tienes en un controlador (CollectionView) y debería ser ahí donde lo modifiques. Lo inicializas y le añades, consultas o le quitas ...
1
voto
Aceptado
Definir auto height en UICollectionViewCell
En las celdas de tipo UICollectionViewCell funciona exactamente igual que el UITableViewCell. Lo más importante es que el las constraints del Autolayout estén correctamente configuradas.
Por otro ...
Only top scored, non community-wiki answers of a minimum length are eligible
Etiquetas relacionadas
uicollectionview × 14swift × 12
xcode × 6
ios × 3
swift3 × 3
uitableview × 3
swift4 × 2
array × 1
botón × 1
swift2 × 1
iphone × 1
constraints × 1