I have UICollectionViewCell with UITextView. When I tap on textView, it becomes firstResponder, but when I scroll out and scroll that cell back to visible area there is no marker anymore on it, though keyboard is still visible. If I try to type text, textView does not show new symbols, but when I log that textView.text I see there IS these typed symbols. Why visible textView does not render that new text?
Asked
Active
Viewed 800 times
0
-
Please post your implementation of collectionView:cellForItemAtIndexPath: – Ahmed Mohammed Jul 19 '13 at 17:41
-
I'm already at home, so I will post it as soon as I will be at work – Povilas Jul 19 '13 at 18:25
-
static NSString *const MainCell = @"MainCell"; UICollectionViewCell *returningCell = [collectionView dequeueReusableCellWithReuseIdentifier:MainCell forIndexPath:indexPath]; – Povilas Jul 22 '13 at 06:12
1 Answers
0
iOS recycles collection view and table view cells when they are scrolled off screen. When scrolled back onto screen you are responsible for configuring the cell again in your cellForItemAtIndexPath method (or cellForRowAtIndexPath if a table view).

Nicholas Hart
- 1,734
- 13
- 22
-
when I do the same on tableView, everything works fine, cell textView still contains firstResponder and renders new symbols. But in collectionView - not, and more - collectionView can not find indexPath for that cell after this action. – Povilas Jul 19 '13 at 18:23
-
it looks like dequeueReusableCellWithIdentifier: forIndexPath: returns bad cell, but hex address of cell before and after is the same. – Povilas Jul 19 '13 at 18:42