I have a UICollectionView
with custom cells that have a UITextView
inside.
The user can tap any text inside the text field. When the text field's height gets bigger than the size of the cell, the cell advises the collection view to reload itself.
-(void)updatedCell:(UICollectionViewCell*)cellToUp{
NSIndexPath *indexPath = [self.collectionView indexPathForCell:cellToUpdateSize];
BOOL animationsEnabled = [UIView areAnimationsEnabled];
[UIView setAnimationsEnabled:NO];
[self.collectionView reloadItemsAtIndexPaths:[NSArray arrayWithObject:indexPath]];
[UIView setAnimationsEnabled:animationsEnabled];
}
The problem is that when the cell is "reloading", the keyboard is dismissed and shown up again without any text field associated with it. Is there any solution to avoid dismissing the keyboard?
Thanks in advance.